diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-12-06 16:11:39 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-12-06 18:44:31 +0000 |
commit | 31b136e5802e1b1e5f9a9589736afe0652f34da2 (patch) | |
tree | 9779b5d95f79318082347ed7f762a53e0fdb6016 /src/wallet | |
parent | 1c65c075ee4c7f98d9c1fac5ed7576b96374d4e9 (diff) |
Don't declare de facto const reference variables as non-const
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/feebumper.cpp | 2 | ||||
-rw-r--r-- | src/wallet/wallet.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/feebumper.cpp b/src/wallet/feebumper.cpp index 7a8bc0b7f3..fa38fcc0ce 100644 --- a/src/wallet/feebumper.cpp +++ b/src/wallet/feebumper.cpp @@ -256,7 +256,7 @@ Result CommitTransaction(CWallet& wallet, const uint256& txid, CMutableTransacti errors.push_back(Untranslated("Invalid or non-wallet transaction id")); return Result::MISC_ERROR; } - CWalletTx& oldWtx = it->second; + const CWalletTx& oldWtx = it->second; // make sure the transaction still has no descendants and hasn't been mined in the meantime Result result = PreconditionChecks(wallet, oldWtx, errors); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 5c3d7a9d75..ce668d0468 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -570,7 +570,7 @@ void CWallet::AddToSpends(const uint256& wtxid) { auto it = mapWallet.find(wtxid); assert(it != mapWallet.end()); - CWalletTx& thisTx = it->second; + const CWalletTx& thisTx = it->second; if (thisTx.IsCoinBase()) // Coinbases don't spend anything! return; @@ -1053,7 +1053,7 @@ bool CWallet::AbandonTransaction(const uint256& hashTx) // Can't mark abandoned if confirmed or in mempool auto it = mapWallet.find(hashTx); assert(it != mapWallet.end()); - CWalletTx& origtx = it->second; + const CWalletTx& origtx = it->second; if (origtx.GetDepthInMainChain() != 0 || origtx.InMempool()) { return false; } |