We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cf09f5 commit 73be137Copy full SHA for 73be137
packages/devp2p/src/dpt/kbucket.ts
@@ -13,11 +13,11 @@ export interface CustomContact extends PeerInfo {
13
export class KBucket extends EventEmitter {
14
_peers: Map<string, PeerInfo> = new Map()
15
_kbucket: _KBucket
16
- constructor(id: string | Buffer) {
+ constructor(localNodeId: Buffer) {
17
super()
18
19
this._kbucket = new _KBucket<CustomContact>({
20
- localNodeId: typeof id === 'string' ? Buffer.from(id) : id,
+ localNodeId,
21
numberOfNodesPerKBucket: KBUCKET_SIZE,
22
numberOfNodesToPing: KBUCKET_CONCURRENCY,
23
})
0 commit comments