Skip to content

Commit aa0b4a8

Browse files
committed
devp2p: fixed bug where nextForkBlock has not been send along ETH/64 status message
1 parent b88cf95 commit aa0b4a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/devp2p/src/eth/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class ETH extends EventEmitter {
4141
// Set forkHash and nextForkBlock
4242
if (this._version >= 64) {
4343
const c = this._peer._common
44-
this._hardfork = c.hardfork() ? (c.hardfork() as string) : this._hardfork
44+
this._hardfork = c.hardfork() ? c.hardfork() : this._hardfork
4545
// Set latestBlock minimally to start block of fork to have some more
4646
// accurate basis if no latestBlock is provided along status send
4747
this._latestBlock = c.hardforkBlock(this._hardfork)
@@ -208,7 +208,7 @@ export class ETH extends EventEmitter {
208208
this._latestBlock = status.latestBlock
209209
}
210210
const forkHashB = Buffer.from(this._forkHash.substr(2), 'hex')
211-
const nextForkB = Buffer.from(this._nextForkBlock.toString(16), 'hex')
211+
const nextForkB = int2buffer(this._nextForkBlock)
212212
this._status.push([forkHashB, nextForkB])
213213
}
214214

0 commit comments

Comments
 (0)