Skip to content

Commit

Permalink
Use constant header fields in hash if present
Browse files Browse the repository at this point in the history
  • Loading branch information
karlb committed Jun 23, 2023
1 parent 7665bce commit 1c6df2a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/celotool/src/e2e-tests/slashing_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ function headerArray(block: any) {
if (block.gasLimit) {
headerHashData.push(block.gasLimit)
}
if (block.nonce) {
// All these fields are set after GFork, but difficulty is already returned
// in RPC as an Eth-compatibility feature before, so we can't use it to
// check if we are after GFork
headerHashData.push(new BigNumber(block.difficulty).toNumber())
headerHashData.push(block.nonce)
headerHashData.push(block.sha3Uncles)
headerHashData.push(block.mixHash)
}
return headerHashData
}

Expand Down

0 comments on commit 1c6df2a

Please sign in to comment.