diff options
author | Carl Dong <contact@carldong.me> | 2021-03-17 16:32:24 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-03-24 15:40:56 -0400 |
commit | 7b8e976cd5ac78a22f1be2b2fed8562c693af5d9 (patch) | |
tree | 7cc8c7b03ef9b139d8dc5bc258cd848fc9dfc5a1 /src/test/util | |
parent | e62067e7bcad5a559899afff2e4a8e8b7e9f4301 (diff) | |
download | bitcoin-7b8e976cd5ac78a22f1be2b2fed8562c693af5d9.tar.xz |
miner: Add chainstate member to BlockAssembler
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/mining.cpp | 2 | ||||
-rw-r--r-- | src/test/util/setup_common.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/util/mining.cpp b/src/test/util/mining.cpp index 0c6487fbfa..3fc3329da2 100644 --- a/src/test/util/mining.cpp +++ b/src/test/util/mining.cpp @@ -41,7 +41,7 @@ CTxIn MineBlock(const NodeContext& node, const CScript& coinbase_scriptPubKey) std::shared_ptr<CBlock> PrepareBlock(const NodeContext& node, const CScript& coinbase_scriptPubKey) { auto block = std::make_shared<CBlock>( - BlockAssembler{*Assert(node.mempool), Params()} + BlockAssembler{::ChainstateActive(), *Assert(node.mempool), Params()} .CreateNewBlock(coinbase_scriptPubKey) ->block); diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index ebdde79c85..ff19a1feb1 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -244,7 +244,7 @@ CBlock TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransa { const CChainParams& chainparams = Params(); CTxMemPool empty_pool; - CBlock block = BlockAssembler(empty_pool, chainparams).CreateNewBlock(scriptPubKey)->block; + CBlock block = BlockAssembler(::ChainstateActive(), empty_pool, chainparams).CreateNewBlock(scriptPubKey)->block; Assert(block.vtx.size() == 1); for (const CMutableTransaction& tx : txns) { |