aboutsummaryrefslogtreecommitdiff
path: root/src/node/coin.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-10-14 14:12:04 -0400
committerCarl Dong <contact@carldong.me>2021-03-08 15:54:31 -0500
commit4cde4a701b8856ac4ec9721b0226dbbfc52a71c3 (patch)
tree204dde198486050f7523d89415d89accf4d05f12 /src/node/coin.cpp
parent106bcd4f390137904b5579cfef023fb8a5c8b4b5 (diff)
node: Use existing NodeContext
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)) {