*Refactor to start the dns up only after the ssl and server instances are ready so we don't announce ourselves on the registry pre-maturely
This commit is contained in:
parent
8d7db21184
commit
a4ddcdf518
|
@ -1,8 +1,6 @@
|
|||
import { start as startDns } from "./dns.js";
|
||||
import { start as startRpc } from "./rpc.js";
|
||||
import { start as startRelay } from "./relay.js";
|
||||
|
||||
await startDns();
|
||||
await startRpc();
|
||||
await startRelay();
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import NodeCache from "node-cache";
|
|||
import { get as getDHT } from "./dht.js";
|
||||
import { rpcMethods } from "./rpc/index.js";
|
||||
import PocketPKG from "@pokt-network/pocket-js";
|
||||
import { start as startDns } from "./dns.js";
|
||||
|
||||
const { Configuration, HttpRpcProvider, PocketAAT, Pocket } = PocketPKG;
|
||||
import {
|
||||
|
@ -245,6 +246,8 @@ export async function start() {
|
|||
jsonServer = new jayson.Server(rpcMethods, { useContext: true });
|
||||
|
||||
(await getDHT("server")).on("connection", RPCConnection.handleRequest);
|
||||
|
||||
await startDns();
|
||||
}
|
||||
|
||||
class RPCConnection {
|
||||
|
|
Loading…
Reference in New Issue