aboutsummaryrefslogtreecommitdiff
path: root/src/test/util/mining.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-11-04 19:34:22 -0500
committerCarl Dong <contact@carldong.me>2021-03-08 15:54:31 -0500
commit46b7f29340acb399fbd2378508a204d8d8ee8fca (patch)
treee17aa955131cdeaea851e9b0d435a6ea7165e208 /src/test/util/mining.cpp
parentd0de61b764fc7e9c670b69d8210705da296dd245 (diff)
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-
Diffstat (limited to 'src/test/util/mining.cpp')
-rw-r--r--src/test/util/mining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/util/mining.cpp b/src/test/util/mining.cpp
index 0c6487fbfa..ba1edba0ae 100644
--- a/src/test/util/mining.cpp
+++ b/src/test/util/mining.cpp
@@ -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);