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.h36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/node/miner.h b/src/node/miner.h
index c3178a7532..1b82943766 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 <node/types.h>
#include <policy/policy.h>
#include <primitives/block.h>
#include <txmempool.h>
@@ -30,7 +31,7 @@ class ChainstateManager;
namespace Consensus { struct Params; };
namespace node {
-static const bool DEFAULT_PRINTPRIORITY = false;
+static const bool DEFAULT_PRINT_MODIFIED_FEE = false;
struct CBlockTemplate
{
@@ -96,21 +97,25 @@ struct CompareTxIterByAncestorCount {
}
};
+
+struct CTxMemPoolModifiedEntry_Indices final : boost::multi_index::indexed_by<
+ boost::multi_index::ordered_unique<
+ modifiedentry_iter,
+ CompareCTxMemPoolIter
+ >,
+ // sorted by modified ancestor fee rate
+ boost::multi_index::ordered_non_unique<
+ // Reuse same tag from CTxMemPool's similar index
+ boost::multi_index::tag<ancestor_score>,
+ boost::multi_index::identity<CTxMemPoolModifiedEntry>,
+ CompareTxMemPoolEntryByAncestorFee
+ >
+>
+{};
+
typedef boost::multi_index_container<
CTxMemPoolModifiedEntry,
- boost::multi_index::indexed_by<
- boost::multi_index::ordered_unique<
- modifiedentry_iter,
- CompareCTxMemPoolIter
- >,
- // sorted by modified ancestor fee rate
- boost::multi_index::ordered_non_unique<
- // Reuse same tag from CTxMemPool's similar index
- boost::multi_index::tag<ancestor_score>,
- boost::multi_index::identity<CTxMemPoolModifiedEntry>,
- CompareTxMemPoolEntryByAncestorFee
- >
- >
+ CTxMemPoolModifiedEntry_Indices
> indexed_modified_transaction_set;
typedef indexed_modified_transaction_set::nth_index<0>::type::iterator modtxiter;
@@ -153,12 +158,13 @@ private:
Chainstate& m_chainstate;
public:
- struct Options {
+ struct Options : BlockCreateOptions {
// 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};
+ bool print_modified_fee{DEFAULT_PRINT_MODIFIED_FEE};
};
explicit BlockAssembler(Chainstate& chainstate, const CTxMemPool* mempool, const Options& options);