fix: Start the rpc Server before the ethEventsProvider for smoke test (#812)

* fix: Start the rpc Server before the ethEventsProvider for smoke test

* changeset
This commit is contained in:
adityapk00
2023-04-04 14:19:03 -05:00
committed by GitHub
parent 13415ead71
commit 8e46cac194
2 changed files with 11 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
---
'@farcaster/hubble': patch
---
Start rpcServer before ethEventsProvider

View File

@@ -327,6 +327,12 @@ export class Hub implements HubInterface {
await this.engine.start();
// Start the RPC server
await this.rpcServer.start(this.options.rpcServerHost, this.options.rpcPort ? this.options.rpcPort : 0);
if (this.options.adminServerEnabled) {
await this.adminServer.start(this.options.adminServerHost ?? '127.0.0.1');
}
// Start the ETH registry provider first
if (this.ethRegistryProvider) {
await this.ethRegistryProvider.start();
@@ -347,11 +353,6 @@ export class Hub implements HubInterface {
allowedPeerIdStrs: this.options.allowedPeers,
});
// Start the RPC server
await this.rpcServer.start(this.options.rpcServerHost, this.options.rpcPort ? this.options.rpcPort : 0);
if (this.options.adminServerEnabled) {
await this.adminServer.start(this.options.adminServerHost ?? '127.0.0.1');
}
this.registerEventHandlers();
// Start cron tasks