diff options
Diffstat (limited to 'src/node/coin.cpp')
-rw-r--r-- | src/node/coin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/node/coin.cpp b/src/node/coin.cpp index f4f86cdbe9..23d4fa2aae 100644 --- a/src/node/coin.cpp +++ b/src/node/coin.cpp @@ -11,8 +11,10 @@ void FindCoins(const NodeContext& node, std::map<COutPoint, Coin>& coins) { assert(node.mempool); + assert(node.chainman); LOCK2(cs_main, node.mempool->cs); - CCoinsViewCache& chain_view = ::ChainstateActive().CoinsTip(); + assert(std::addressof(::ChainstateActive()) == std::addressof(node.chainman->ActiveChainstate())); + CCoinsViewCache& chain_view = node.chainman->ActiveChainstate().CoinsTip(); CCoinsViewMemPool mempool_view(&chain_view, *node.mempool); for (auto& coin : coins) { if (!mempool_view.GetCoin(coin.first, coin.second)) { |