aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2024-07-16 10:13:28 +0200
committerSjors Provoost <sjors@sprovoost.nl>2024-07-16 10:27:57 +0200
commit6b4c817d4b978adf69738677c74855ef0675f333 (patch)
treeb4cc50a4e3491ad419f9e0865fd0a31c49ecc714 /src/rpc
parent323cfed5959b25c98235ec988b408fc5e3391e3c (diff)
downloadbitcoin-6b4c817d4b978adf69738677c74855ef0675f333.tar.xz
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/rpc')
-rw-r--r--src/rpc/mining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index e16f75ab78..8482ce6eb2 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -371,7 +371,7 @@ static RPCHelpMan generateblock()
ChainstateManager& chainman = EnsureChainman(node);
{
- std::unique_ptr<CBlockTemplate> blocktemplate{miner.createNewBlock(coinbase_script, /*use_mempool=*/false)};
+ std::unique_ptr<CBlockTemplate> blocktemplate{miner.createNewBlock(coinbase_script, {.use_mempool = false})};
if (!blocktemplate) {
throw JSONRPCError(RPC_INTERNAL_ERROR, "Couldn't create new block");
}