Skip to content

Commit

Permalink
Using gasLimit in hash if present
Browse files Browse the repository at this point in the history
to make the slasher test work when gasLimit is added to the header in
celo-org/celo-blockchain#2062. This function
will change again as part of
celo-org/celo-blockchain-planning#100.
  • Loading branch information
karlb authored and gastonponti committed Jun 15, 2023
1 parent 5b2cec9 commit 35b2a3e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/celotool/src/e2e-tests/slashing_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const TMP_PATH = '/tmp/e2e'
const safeMarginBlocks = 4

function headerArray(block: any) {
return [
const headerHashData = [
block.parentHash,
block.miner,
block.stateRoot,
Expand All @@ -30,6 +30,10 @@ function headerArray(block: any) {
block.timestamp,
block.extraData,
]
if (block.gasLimit) {
headerHashData.push(block.gasLimit)
}
return headerHashData
}

function headerFromBlock(block: any) {
Expand Down

0 comments on commit 35b2a3e

Please sign in to comment.