Skip to content

Commit 8b05076

Browse files
committed
Merge bitcoin/bitcoin#26409: refactor: Silence GCC Wmissing-field-initializers in ChainstateManagerOpts
fa29ef0 refactor: Silence GCC Wmissing-field-initializers in ChainstateManagerOpts (MacroFake) Pull request description: The `std::optional` fields in the struct that fall back to chain param defaults if not provided should be initialized to `std::nullopt`. This already happens with the current code. However, for consistency with `check_block_index` and to silence a GCC warning, add the "missing" `{}`. ACKs for top commit: achow101: ACK fa29ef0 hebasto: ACK fa29ef0, tested on Ubuntu 22.04 + GCC 11.3. jonatack: ACK fa29ef0 Tree-SHA512: bdec9c56df5d601a5616e107fed48737b13b0a7242b6526092fb682b5016544a4bc08666b60304c668d44c6f7ac69d3788093d921382c1d6c577c1f9fe31fc50
2 parents 1bad29f + fa29ef0 commit 8b05076

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/kernel/chainstatemanager_opts.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ struct ChainstateManagerOpts {
3131
std::optional<bool> check_block_index{};
3232
bool checkpoints_enabled{DEFAULT_CHECKPOINTS_ENABLED};
3333
//! If set, it will override the minimum work we will assume exists on some valid chain.
34-
std::optional<arith_uint256> minimum_chain_work;
34+
std::optional<arith_uint256> minimum_chain_work{};
3535
//! If set, it will override the block hash whose ancestors we will assume to have valid scripts without checking them.
36-
std::optional<uint256> assumed_valid_block;
36+
std::optional<uint256> assumed_valid_block{};
3737
//! If the tip is older than this, the node is considered to be in initial block download.
3838
std::chrono::seconds max_tip_age{DEFAULT_MAX_TIP_AGE};
3939
};

0 commit comments

Comments
 (0)