File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,7 @@ export class P2pWorker {
208208 }
209209
210210 async connect ( ) {
211+ this . setupListeners ( ) ;
211212 this . pool . connect ( ) ;
212213 this . connectInterval = setInterval ( this . pool . connect . bind ( this . pool ) , 5000 ) ;
213214 return new Promise < void > ( resolve => {
@@ -446,7 +447,6 @@ export class P2pWorker {
446447
447448 async start ( ) {
448449 logger . debug ( `Started worker for chain ${ this . chain } ` ) ;
449- this . setupListeners ( ) ;
450450 await this . connect ( ) ;
451451 this . registerSyncingNode ( ) ;
452452 }
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ import { BlockStorage } from '../../src/models/block';
1818 await Storage . start ( ) ;
1919 const chainConfig = Config . chainConfig ( { chain, network } ) ;
2020 const worker = new P2pWorker ( { chain, network, chainConfig } ) ;
21- await worker . start ( ) ;
21+ await worker . connect ( ) ;
22+
2223 const handleRepair = async data => {
2324 switch ( data . type ) {
2425 case 'DUPE_COIN' :
You can’t perform that action at this time.
0 commit comments