Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1// Copyright (c) The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or http://www.opensource.org/licenses/mit-license.php.5#ifndef BITCOIN_NODE_MINING_ARGS_H6#define BITCOIN_NODE_MINING_ARGS_H8#include <node/mining_types.h>9#include <util/result.h>11class ArgsManager;13namespace node {15inline constexpr bool DEFAULT_PRINT_MODIFIED_FEE = false;17/**18* Read the mining options set in \p args. Returns an error if one was19* encountered.20*/21[[nodiscard]] util::Result<BlockCreateOptions> ReadMiningArgs(const ArgsManager& args);23/** Check option values for validity. Returns an error for invalid values. */24[[nodiscard]] util::Result<void> CheckMiningOptions(BlockCreateOptions options, bool use_argnames);26/** Replace null optional values with their hardcoded defaults. */27[[nodiscard]] BlockCreateOptions FlattenMiningOptions(BlockCreateOptions options);29/**30* Merge two BlockCreateOptions structs, replacing null values in \p x with31* non-null values from \p y.32*/33[[nodiscard]] BlockCreateOptions MergeMiningOptions(BlockCreateOptions x, const BlockCreateOptions& y);35} // namespace node37#endif // BITCOIN_NODE_MINING_ARGS_H