mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
scripted-diff: Invoke CreateNewBlock with chainstate
-BEGIN VERIFY SCRIPT-
find_regex='(\.|->)CreateNewBlock\(' \
&& git grep -l -E "$find_regex" -- src \
| grep -v '^src/miner\.\(cpp\|h\)$' \
| xargs sed -i -E 's@'"$find_regex"'@\0::ChainstateActive(), @g'
-END VERIFY SCRIPT-
This commit is contained in:
@@ -42,7 +42,7 @@ std::shared_ptr<CBlock> PrepareBlock(const NodeContext& node, const CScript& coi
|
||||
{
|
||||
auto block = std::make_shared<CBlock>(
|
||||
BlockAssembler{*Assert(node.mempool), Params()}
|
||||
.CreateNewBlock(coinbase_scriptPubKey)
|
||||
.CreateNewBlock(::ChainstateActive(), coinbase_scriptPubKey)
|
||||
->block);
|
||||
|
||||
LOCK(cs_main);
|
||||
|
||||
Reference in New Issue
Block a user