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.
This commit is contained in:
Daniel Kraft
2014-07-19 17:14:23 +02:00
parent a3dc587a62
commit d0867acb0e
4 changed files with 9 additions and 9 deletions

View File

@@ -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.