Skip to content

Commit 4b2d1cc

Browse files
committed
client, devp2p -> VM execution: increased protocol timeout to 4000 for flow internet connections, fixed rebase bug in DPT.refresh()
1 parent 28733ac commit 4b2d1cc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/client/lib/service/ethereumservice.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface EthereumServiceOptions extends ServiceOptions {
1717
/* Sync retry interval in ms (default: 8000) */
1818
interval?: number
1919

20-
/* Protocol timeout in ms (default: 2000) */
20+
/* Protocol timeout in ms (default: 4000) */
2121
timeout?: number
2222
}
2323

@@ -42,7 +42,7 @@ export class EthereumService extends Service {
4242
this.flow = new FlowControl()
4343
this.chain = options.chain ?? new Chain(options)
4444
this.interval = options.interval ?? 8000
45-
this.timeout = options.timeout ?? 2000
45+
this.timeout = options.timeout ?? 4000
4646
}
4747

4848
/**

packages/devp2p/src/dpt/dpt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export class DPT extends EventEmitter {
178178
for (const peer of peers) {
179179
// Randomly distributed selector based on peer ID
180180
// to decide on subdivided execution
181-
const selector = buffer2int(peer.id.slice(0, 1)) % 10
181+
const selector = buffer2int(((peer.id)! as Buffer).slice(0, 1)) % 10
182182
if (selector === this._refreshIntervalSelectionCounter) {
183183
this._server.findneighbours(peer, randomBytes(64))
184184
}

0 commit comments

Comments
 (0)