diff options
author | Carl Dong <contact@carldong.me> | 2020-11-04 19:34:22 -0500 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-03-08 15:54:31 -0500 |
commit | 46b7f29340acb399fbd2378508a204d8d8ee8fca (patch) | |
tree | e17aa955131cdeaea851e9b0d435a6ea7165e208 /src/test/blockfilter_index_tests.cpp | |
parent | d0de61b764fc7e9c670b69d8210705da296dd245 (diff) | |
download | bitcoin-46b7f29340acb399fbd2378508a204d8d8ee8fca.tar.xz |
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/blockfilter_index_tests.cpp')
-rw-r--r-- | src/test/blockfilter_index_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/blockfilter_index_tests.cpp b/src/test/blockfilter_index_tests.cpp index 633a95ce96..04da10715f 100644 --- a/src/test/blockfilter_index_tests.cpp +++ b/src/test/blockfilter_index_tests.cpp @@ -62,7 +62,7 @@ CBlock BuildChainTestingSetup::CreateBlock(const CBlockIndex* prev, const CScript& scriptPubKey) { const CChainParams& chainparams = Params(); - std::unique_ptr<CBlockTemplate> pblocktemplate = BlockAssembler(*m_node.mempool, chainparams).CreateNewBlock(scriptPubKey); + std::unique_ptr<CBlockTemplate> pblocktemplate = BlockAssembler(*m_node.mempool, chainparams).CreateNewBlock(::ChainstateActive(), scriptPubKey); CBlock& block = pblocktemplate->block; block.hashPrevBlock = prev->GetBlockHash(); block.nTime = prev->nTime + 1; |