aboutsummaryrefslogtreecommitdiff
path: root/src/node/coin.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-03-17 16:58:22 -0400
committerCarl Dong <contact@carldong.me>2021-03-30 13:52:22 -0400
commit88aead263c61d86e5f836028f517cfbf2a575498 (patch)
treebe96a4eea8c07f4bcafd709dd791df85fec39045 /src/node/coin.cpp
parent1dd8ed7a8491e51b76eeb236b15b794d9254f674 (diff)
node: Avoid potential UB by asserting assumptions
Diffstat (limited to 'src/node/coin.cpp')
-rw-r--r--src/node/coin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node/coin.cpp b/src/node/coin.cpp
index 263dcff657..23d4fa2aae 100644
--- a/src/node/coin.cpp
+++ b/src/node/coin.cpp
@@ -11,6 +11,7 @@
void FindCoins(const NodeContext& node, std::map<COutPoint, Coin>& coins)
{
assert(node.mempool);
+ assert(node.chainman);
LOCK2(cs_main, node.mempool->cs);
assert(std::addressof(::ChainstateActive()) == std::addressof(node.chainman->ActiveChainstate()));
CCoinsViewCache& chain_view = node.chainman->ActiveChainstate().CoinsTip();