aboutsummaryrefslogtreecommitdiff
path: root/src/node/coin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/coin.cpp')
-rw-r--r--src/node/coin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node/coin.cpp b/src/node/coin.cpp
index f4f86cdbe9..263dcff657 100644
--- a/src/node/coin.cpp
+++ b/src/node/coin.cpp
@@ -12,7 +12,8 @@ void FindCoins(const NodeContext& node, std::map<COutPoint, Coin>& coins)
{
assert(node.mempool);
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)) {