diff options
author | MacroFake <falke.marco@gmail.com> | 2022-05-18 18:36:31 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-05-18 18:46:48 +0200 |
commit | fa1b76aeb064b315a3767a8f59836ca18aeb117e (patch) | |
tree | ab057aca9b58d826758f61a920f48ea0eb9ef241 /src/test/blockfilter_index_tests.cpp | |
parent | fa30234be81b6f49ae8150478a9255daa1611083 (diff) | |
download | bitcoin-fa1b76aeb064b315a3767a8f59836ca18aeb117e.tar.xz |
Do not call global Params() when chainman is in scope
Diffstat (limited to 'src/test/blockfilter_index_tests.cpp')
-rw-r--r-- | src/test/blockfilter_index_tests.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/blockfilter_index_tests.cpp b/src/test/blockfilter_index_tests.cpp index 07d3098375..ba1eacfc78 100644 --- a/src/test/blockfilter_index_tests.cpp +++ b/src/test/blockfilter_index_tests.cpp @@ -65,7 +65,6 @@ CBlock BuildChainTestingSetup::CreateBlock(const CBlockIndex* prev, const std::vector<CMutableTransaction>& txns, const CScript& scriptPubKey) { - const CChainParams& chainparams = Params(); std::unique_ptr<CBlockTemplate> pblocktemplate = BlockAssembler{m_node.chainman->ActiveChainstate(), *m_node.mempool}.CreateNewBlock(scriptPubKey); CBlock& block = pblocktemplate->block; block.hashPrevBlock = prev->GetBlockHash(); @@ -83,7 +82,7 @@ CBlock BuildChainTestingSetup::CreateBlock(const CBlockIndex* prev, block.hashMerkleRoot = BlockMerkleRoot(block); } - while (!CheckProofOfWork(block.GetHash(), block.nBits, chainparams.GetConsensus())) ++block.nNonce; + while (!CheckProofOfWork(block.GetHash(), block.nBits, m_node.chainman->GetConsensus())) ++block.nNonce; return block; } |