diff --git a/test/unittests/blockchaintest_runner_test.cpp b/test/unittests/blockchaintest_runner_test.cpp index 6a28ea1870..f16abd5ca9 100644 --- a/test/unittests/blockchaintest_runner_test.cpp +++ b/test/unittests/blockchaintest_runner_test.cpp @@ -23,10 +23,9 @@ constexpr auto GENESIS_HASH = 0x9e11_bytes32; constexpr int64_t GAS_LIMIT = 0x100000; /// A fixture with one block that validate_block() accepts, for a test to then break in one way. -/// BlockHeader has no default member initializers, hence the value-initialization. BlockchainTest one_block_fixture() { - BlockchainTest t{}; + BlockchainTest t; t.name = "unit"; t.network = "Prague"; @@ -37,7 +36,7 @@ BlockchainTest one_block_fixture() g.withdrawal_root = state::EMPTY_MPT_HASH; g.hash = GENESIS_HASH; - TestBlock b{}; + TestBlock b; b.block_info.number = g.block_number + 1; b.block_info.parent_hash = g.hash; b.block_info.gas_limit = g.gas_limit; diff --git a/test/utils/blockchaintest.hpp b/test/utils/blockchaintest.hpp index 0fa18fc2a3..56ee86ec79 100644 --- a/test/utils/blockchaintest.hpp +++ b/test/utils/blockchaintest.hpp @@ -28,14 +28,14 @@ struct BlockHeader hash256 state_root; hash256 receipts_root; state::BloomFilter logs_bloom; - int64_t difficulty; + int64_t difficulty = 0; bytes32 prev_randao; - int64_t block_number; - int64_t gas_limit; - int64_t gas_used; - int64_t timestamp; + int64_t block_number = 0; + int64_t gas_limit = 0; + int64_t gas_used = 0; + int64_t timestamp = 0; bytes extra_data; - uint64_t base_fee_per_gas; + uint64_t base_fee_per_gas = 0; hash256 hash; hash256 transactions_root; hash256 withdrawal_root;