From d0867acb0e07ac63f03dcc555387f24322e8799e Mon Sep 17 00:00:00 2001 From: Daniel Kraft Date: Sat, 19 Jul 2014 17:14:23 +0200 Subject: Use const CCoinsView's at some places. At some places where it is possible (e. g., CheckInputs), use a const version of CCoinsView instead of a non-const one. --- src/txmempool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/txmempool.cpp') diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 3845a35b37..f75e2212d5 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -484,7 +484,7 @@ void CTxMemPool::clear() ++nTransactionsUpdated; } -void CTxMemPool::check(CCoinsViewCache *pcoins) const +void CTxMemPool::check(const CCoinsViewCache *pcoins) const { if (!fSanityCheck) return; @@ -505,7 +505,7 @@ void CTxMemPool::check(CCoinsViewCache *pcoins) const const CTransaction& tx2 = it2->second.GetTx(); assert(tx2.vout.size() > txin.prevout.n && !tx2.vout[txin.prevout.n].IsNull()); } else { - CCoins &coins = pcoins->GetCoins(txin.prevout.hash); + const CCoins &coins = pcoins->GetCoins(txin.prevout.hash); assert(coins.IsAvailable(txin.prevout.n)); } // Check whether its inputs are marked in mapNextTx. -- cgit v1.2.3