Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions test/unittests/blockchaintest_runner_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions test/utils/blockchaintest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down