aboutsummaryrefslogtreecommitdiff
path: root/src/node/miner.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/miner.h')
-rw-r--r--src/node/miner.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/node/miner.h b/src/node/miner.h
index ea9e470a64..f1ccffff55 100644
--- a/src/node/miner.h
+++ b/src/node/miner.h
@@ -6,6 +6,7 @@
#ifndef BITCOIN_NODE_MINER_H
#define BITCOIN_NODE_MINER_H
+#include <policy/policy.h>
#include <primitives/block.h>
#include <txmempool.h>
@@ -132,13 +133,6 @@ private:
// The constructed block template
std::unique_ptr<CBlockTemplate> pblocktemplate;
- // Configuration parameters for the block size
- unsigned int nBlockMaxWeight;
- CFeeRate blockMinFeeRate;
-
- // Whether to call TestBlockValidity() at the end of CreateNewBlock().
- const bool test_block_validity;
-
// Information on the current status of the block
uint64_t nBlockWeight;
uint64_t nBlockTx;
@@ -156,10 +150,11 @@ private:
public:
struct Options {
- Options();
- size_t nBlockMaxWeight;
- CFeeRate blockMinFeeRate;
- bool test_block_validity;
+ // Configuration parameters for the block size
+ size_t nBlockMaxWeight{DEFAULT_BLOCK_MAX_WEIGHT};
+ CFeeRate blockMinFeeRate{DEFAULT_BLOCK_MIN_TX_FEE};
+ // Whether to call TestBlockValidity() at the end of CreateNewBlock().
+ bool test_block_validity{true};
};
explicit BlockAssembler(Chainstate& chainstate, const CTxMemPool* mempool);
@@ -172,6 +167,8 @@ public:
inline static std::optional<int64_t> m_last_block_weight{};
private:
+ const Options m_options;
+
// utility functions
/** Clear the block's state and prepare for assembling a new block */
void resetBlock();