8
8
#include < consensus/merkle.h>
9
9
#include < key_io.h>
10
10
#include < node/context.h>
11
- #include < node/miner.h>
12
11
#include < pow.h>
13
12
#include < script/standard.h>
14
13
#include < test/util/script.h>
@@ -74,10 +73,11 @@ CTxIn MineBlock(const NodeContext& node, const CScript& coinbase_scriptPubKey)
74
73
return CTxIn{block->vtx [0 ]->GetHash (), 0 };
75
74
}
76
75
77
- std::shared_ptr<CBlock> PrepareBlock (const NodeContext& node, const CScript& coinbase_scriptPubKey)
76
+ std::shared_ptr<CBlock> PrepareBlock (const NodeContext& node, const CScript& coinbase_scriptPubKey,
77
+ const BlockAssembler::Options& assembler_options)
78
78
{
79
79
auto block = std::make_shared<CBlock>(
80
- BlockAssembler{Assert (node.chainman )->ActiveChainstate (), Assert (node.mempool .get ())}
80
+ BlockAssembler{Assert (node.chainman )->ActiveChainstate (), Assert (node.mempool .get ()), assembler_options }
81
81
.CreateNewBlock (coinbase_scriptPubKey)
82
82
->block );
83
83
@@ -87,3 +87,9 @@ std::shared_ptr<CBlock> PrepareBlock(const NodeContext& node, const CScript& coi
87
87
88
88
return block;
89
89
}
90
+ std::shared_ptr<CBlock> PrepareBlock (const NodeContext& node, const CScript& coinbase_scriptPubKey)
91
+ {
92
+ BlockAssembler::Options assembler_options;
93
+ ApplyArgsManOptions (*node.args , assembler_options);
94
+ return PrepareBlock (node, coinbase_scriptPubKey, assembler_options);
95
+ }
0 commit comments