diff options
author | Andrew Chow <github@achow101.com> | 2022-10-28 15:19:05 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2022-10-28 15:37:17 -0400 |
commit | 8b050762b1b44aa6a0b29f7cf7d14e58312ecd12 (patch) | |
tree | b46c02edd9585163c2f09c379ed3d73c6816a93d /src | |
parent | 1bad29fe02096b269858b192a4a91c785a44e505 (diff) | |
parent | fa29ef00adac6f0842acdd38344820a1ce0e3087 (diff) | |
download | bitcoin-8b050762b1b44aa6a0b29f7cf7d14e58312ecd12.tar.xz |
Merge bitcoin/bitcoin#26409: refactor: Silence GCC Wmissing-field-initializers in ChainstateManagerOpts
fa29ef00adac6f0842acdd38344820a1ce0e3087 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 fa29ef00adac6f0842acdd38344820a1ce0e3087
hebasto:
ACK fa29ef00adac6f0842acdd38344820a1ce0e3087, tested on Ubuntu 22.04 + GCC 11.3.
jonatack:
ACK fa29ef00adac6f0842acdd38344820a1ce0e3087
Tree-SHA512: bdec9c56df5d601a5616e107fed48737b13b0a7242b6526092fb682b5016544a4bc08666b60304c668d44c6f7ac69d3788093d921382c1d6c577c1f9fe31fc50
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/chainstatemanager_opts.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/chainstatemanager_opts.h b/src/kernel/chainstatemanager_opts.h index 020ae24c11..226bb6031e 100644 --- a/src/kernel/chainstatemanager_opts.h +++ b/src/kernel/chainstatemanager_opts.h @@ -31,9 +31,9 @@ struct ChainstateManagerOpts { std::optional<bool> check_block_index{}; bool checkpoints_enabled{DEFAULT_CHECKPOINTS_ENABLED}; //! If set, it will override the minimum work we will assume exists on some valid chain. - std::optional<arith_uint256> minimum_chain_work; + std::optional<arith_uint256> minimum_chain_work{}; //! If set, it will override the block hash whose ancestors we will assume to have valid scripts without checking them. - std::optional<uint256> assumed_valid_block; + std::optional<uint256> assumed_valid_block{}; //! If the tip is older than this, the node is considered to be in initial block download. std::chrono::seconds max_tip_age{DEFAULT_MAX_TIP_AGE}; }; |