mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user