aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-05-05 12:52:28 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-05-05 12:52:34 +0200
commite8d917591f28ba332480251a57870284a8bf3427 (patch)
tree3a63343aedd5e7bd8bcbd3936bd8101ff0e07b44
parentff69aafe52f9b2beb674de64e40cf57ce5dbcb4c (diff)
parentf7c4f79f07c777801db7dc047cd45eaf2bba81c9 (diff)
Merge #7977: [trivial] Add missing const qualifiers.
f7c4f79 [trivial] Add missing const qualifiers. (Daniel Kraft)
-rw-r--r--src/main.cpp2
-rw-r--r--src/txmempool.cpp2
-rw-r--r--src/txmempool.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 11ccab253e..2777245654 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1468,7 +1468,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::P
if (fAllowSlow) { // use coin database to locate block that contains transaction, and scan it
int nHeight = -1;
{
- CCoinsViewCache &view = *pcoinsTip;
+ const CCoinsViewCache& view = *pcoinsTip;
const CCoins* coins = view.AccessCoins(hash);
if (coins)
nHeight = coins->nHeight;
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 52c7793118..420f6896b3 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -885,7 +885,7 @@ bool CTxMemPool::HasNoInputsOf(const CTransaction &tx) const
return true;
}
-CCoinsViewMemPool::CCoinsViewMemPool(CCoinsView *baseIn, CTxMemPool &mempoolIn) : CCoinsViewBacked(baseIn), mempool(mempoolIn) { }
+CCoinsViewMemPool::CCoinsViewMemPool(CCoinsView* baseIn, const CTxMemPool& mempoolIn) : CCoinsViewBacked(baseIn), mempool(mempoolIn) { }
bool CCoinsViewMemPool::GetCoins(const uint256 &txid, CCoins &coins) const {
// If an entry in the mempool exists, always return that one, as it's guaranteed to never
diff --git a/src/txmempool.h b/src/txmempool.h
index de4ba0b371..d17e3322d3 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -672,10 +672,10 @@ private:
class CCoinsViewMemPool : public CCoinsViewBacked
{
protected:
- CTxMemPool &mempool;
+ const CTxMemPool& mempool;
public:
- CCoinsViewMemPool(CCoinsView *baseIn, CTxMemPool &mempoolIn);
+ CCoinsViewMemPool(CCoinsView* baseIn, const CTxMemPool& mempoolIn);
bool GetCoins(const uint256 &txid, CCoins &coins) const;
bool HaveCoins(const uint256 &txid) const;
};