diff options
author | Sjors Provoost <sjors@sprovoost.nl> | 2024-07-16 10:13:28 +0200 |
---|---|---|
committer | Sjors Provoost <sjors@sprovoost.nl> | 2024-07-16 10:27:57 +0200 |
commit | 6b4c817d4b978adf69738677c74855ef0675f333 (patch) | |
tree | b4cc50a4e3491ad419f9e0865fd0a31c49ecc714 /src/interfaces | |
parent | 323cfed5959b25c98235ec988b408fc5e3391e3c (diff) |
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>
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/mining.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/interfaces/mining.h b/src/interfaces/mining.h index 974490561a..cebe97edb7 100644 --- a/src/interfaces/mining.h +++ b/src/interfaces/mining.h @@ -5,9 +5,11 @@ #ifndef BITCOIN_INTERFACES_MINING_H #define BITCOIN_INTERFACES_MINING_H +#include <node/types.h> +#include <uint256.h> + #include <memory> #include <optional> -#include <uint256.h> namespace node { struct CBlockTemplate; @@ -41,10 +43,10 @@ public: * Construct a new block template * * @param[in] script_pub_key the coinbase output - * @param[in] use_mempool set false to omit mempool transactions + * @param[in] options options for creating the block * @returns a block template */ - virtual std::unique_ptr<node::CBlockTemplate> createNewBlock(const CScript& script_pub_key, bool use_mempool = true) = 0; + virtual std::unique_ptr<node::CBlockTemplate> createNewBlock(const CScript& script_pub_key, const node::BlockCreateOptions& options={}) = 0; /** * Processes new block. A valid new block is automatically relayed to peers. |