aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorDaniel Kraft <d@domob.eu>2014-07-19 17:14:23 +0200
committerDaniel Kraft <d@domob.eu>2014-08-26 11:29:18 +0200
commitd0867acb0e07ac63f03dcc555387f24322e8799e (patch)
tree0e8013882018d752e12b86de7f854cfb30143d19 /src/txmempool.cpp
parenta3dc587a62f5d12aea1ff8139198bf0441535c5f (diff)
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.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp4
1 files changed, 2 insertions, 2 deletions
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.