aboutsummaryrefslogtreecommitdiff
path: root/src/node/miner.h
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2022-12-15 15:07:41 +0000
committerglozow <gloriajzhao@gmail.com>2022-12-22 11:33:28 +0000
commita2de971ba1c588488dde653a76853666429d4911 (patch)
treef6b9a1a64a16bbd88747e84ea8865c09860f4bd2 /src/node/miner.h
parent8ccab65f289e3cce392cbe01d5fc0e7437f51f1e (diff)
[refactor] add helper to apply ArgsManager to BlockAssembler::Options
This allows us to both manually manipulate options and grab values from ArgsManager (i.e. -blockmaxweight and -blockmintxfee config options) when constructing BlockAssembler::Options. Prior to this change, the only way to apply the config options is by ctoring BlockAssembler with no options, which calls DefaultOptions().
Diffstat (limited to 'src/node/miner.h')
-rw-r--r--src/node/miner.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node/miner.h b/src/node/miner.h
index 7269ce1186..0ee3b5c828 100644
--- a/src/node/miner.h
+++ b/src/node/miner.h
@@ -16,6 +16,7 @@
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index_container.hpp>
+class ArgsManager;
class ChainstateManager;
class CBlockIndex;
class CChainParams;
@@ -197,6 +198,9 @@ int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParam
/** Update an old GenerateCoinbaseCommitment from CreateNewBlock after the block txs have changed */
void RegenerateCommitments(CBlock& block, ChainstateManager& chainman);
+
+/** Apply -blockmintxfee and -blockmaxweight options from ArgsManager to BlockAssembler options. */
+void ApplyArgsManOptions(const ArgsManager& gArgs, BlockAssembler::Options& options);
} // namespace node
#endif // BITCOIN_NODE_MINER_H