From 16c0ed19898112164df38fe10ab6b7fd2c2334fd Mon Sep 17 00:00:00 2001 From: Karl Bartel Date: Fri, 2 Jun 2023 17:09:29 +0200 Subject: [PATCH] Using gasLimit in hash if present to make the slasher test work when gasLimit is added to the header in https://github.com/celo-org/celo-blockchain/pull/2062. This function will change again as part of https://github.com/celo-org/celo-blockchain-planning/issues/100. --- packages/celotool/src/e2e-tests/slashing_tests.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/celotool/src/e2e-tests/slashing_tests.ts b/packages/celotool/src/e2e-tests/slashing_tests.ts index d6e3bcbd233..bdf93af32ef 100644 --- a/packages/celotool/src/e2e-tests/slashing_tests.ts +++ b/packages/celotool/src/e2e-tests/slashing_tests.ts @@ -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, @@ -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) {