Skip to content

Commit 949348c

Browse files
committed
test: Check block number against parent number when validating block
1 parent 8093e5f commit 949348c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/blockchaintest/blockchaintest_runner.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ bool validate_block(
116116
if (parent_header == nullptr)
117117
return false;
118118

119+
if (test_block.block_info.number != parent_header->block_number + 1)
120+
return false;
121+
119122
if (test_block.block_info.gas_used > test_block.block_info.gas_limit)
120123
return false;
121124

0 commit comments

Comments
 (0)