File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ export class DPT extends EventEmitter {
80
80
this . _server . on ( 'peers' , ( peers ) => this . _onServerPeers ( peers ) )
81
81
this . _server . on ( 'error' , ( err ) => this . emit ( 'error' , err ) )
82
82
83
- const refreshIntervalSubdivided = Math . floor ( ( options . refreshInterval || ms ( '60s' ) ) / 10 )
83
+ const refreshIntervalSubdivided = Math . floor ( ( options . refreshInterval ?? ms ( '60s' ) ) / 10 )
84
84
this . _refreshIntervalId = setInterval ( ( ) => this . refresh ( ) , refreshIntervalSubdivided )
85
85
}
86
86
@@ -178,7 +178,7 @@ export class DPT extends EventEmitter {
178
178
for ( const peer of peers ) {
179
179
// Randomly distributed selector based on peer ID
180
180
// to decide on subdivided execution
181
- const selector = buffer2int ( ( ( peer . id ) ! as Buffer ) . slice ( 0 , 1 ) ) % 10
181
+ const selector = buffer2int ( ( peer . id ! as Buffer ) . slice ( 0 , 1 ) ) % 10
182
182
if ( selector === this . _refreshIntervalSelectionCounter ) {
183
183
this . _server . findneighbours ( peer , randomBytes ( 64 ) )
184
184
}
You can’t perform that action at this time.
0 commit comments