mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02:00
refactor: pass BlockCreateOptions to createNewBlock
Rather than pass options individually to createNewBlock and then combining them into BlockAssembler::Options, this commit introduces BlockCreateOptions and passes that instead. Currently there's only one option (use_mempool) but the next commit adds more. Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This commit is contained in:
@@ -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>
|
||||
@@ -153,7 +154,7 @@ 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};
|
||||
|
||||
Reference in New Issue
Block a user