mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
[trivial] Add missing const qualifiers.
Add some const qualifiers to references that are not modified and should be marked as const.
This commit is contained in:
parent
0ad1041904
commit
f7c4f79f07
@ -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
|
if (fAllowSlow) { // use coin database to locate block that contains transaction, and scan it
|
||||||
int nHeight = -1;
|
int nHeight = -1;
|
||||||
{
|
{
|
||||||
CCoinsViewCache &view = *pcoinsTip;
|
const CCoinsViewCache& view = *pcoinsTip;
|
||||||
const CCoins* coins = view.AccessCoins(hash);
|
const CCoins* coins = view.AccessCoins(hash);
|
||||||
if (coins)
|
if (coins)
|
||||||
nHeight = coins->nHeight;
|
nHeight = coins->nHeight;
|
||||||
|
@ -885,7 +885,7 @@ bool CTxMemPool::HasNoInputsOf(const CTransaction &tx) const
|
|||||||
return true;
|
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 {
|
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
|
// If an entry in the mempool exists, always return that one, as it's guaranteed to never
|
||||||
|
@ -672,10 +672,10 @@ private:
|
|||||||
class CCoinsViewMemPool : public CCoinsViewBacked
|
class CCoinsViewMemPool : public CCoinsViewBacked
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
CTxMemPool &mempool;
|
const CTxMemPool& mempool;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CCoinsViewMemPool(CCoinsView *baseIn, CTxMemPool &mempoolIn);
|
CCoinsViewMemPool(CCoinsView* baseIn, const CTxMemPool& mempoolIn);
|
||||||
bool GetCoins(const uint256 &txid, CCoins &coins) const;
|
bool GetCoins(const uint256 &txid, CCoins &coins) const;
|
||||||
bool HaveCoins(const uint256 &txid) const;
|
bool HaveCoins(const uint256 &txid) const;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user