From d5e490d9f2fa87ea9b08f7f8e899a1495c37873d Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 27 Jul 2018 16:56:26 -0700 Subject: [PATCH] Rename CWallet::AddToSpends methods for clarity. --- src/wallet/wallet.cpp | 13 +++++++++---- src/wallet/wallet.h | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 1e4220140..3c15aa5ff 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -725,7 +725,7 @@ bool CWallet::IsSpent(const uint256& nullifier) const return false; } -void CWallet::AddToSpends(const COutPoint& outpoint, const uint256& wtxid) +void CWallet::AddToTransparentSpends(const COutPoint& outpoint, const uint256& wtxid) { mapTxSpends.insert(make_pair(outpoint, wtxid)); @@ -734,7 +734,7 @@ void CWallet::AddToSpends(const COutPoint& outpoint, const uint256& wtxid) SyncMetaData(range); } -void CWallet::AddToSpends(const uint256& nullifier, const uint256& wtxid) +void CWallet::AddToSproutSpends(const uint256& nullifier, const uint256& wtxid) { mapTxNullifiers.insert(make_pair(nullifier, wtxid)); @@ -751,11 +751,11 @@ void CWallet::AddToSpends(const uint256& wtxid) return; for (const CTxIn& txin : thisTx.vin) { - AddToSpends(txin.prevout, wtxid); + AddToTransparentSpends(txin.prevout, wtxid); } for (const JSDescription& jsdesc : thisTx.vjoinsplit) { for (const uint256& nullifier : jsdesc.nullifiers) { - AddToSpends(nullifier, wtxid); + AddToSproutSpends(nullifier, wtxid); } } } @@ -1248,7 +1248,12 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletD wtxIn.GetHash().ToString(), wtxIn.hashBlock.ToString()); } +<<<<<<< HEAD + AddToSproutSpends(hash); +======= AddToSpends(hash); + AddToSaplingSpends(hash); +>>>>>>> e9b1ce0... fix } bool fUpdated = false; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index dc00c4a7e..93024cf94 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -717,8 +717,8 @@ private: typedef TxSpendMap TxNullifiers; TxNullifiers mapTxNullifiers; - void AddToSpends(const COutPoint& outpoint, const uint256& wtxid); - void AddToSpends(const uint256& nullifier, const uint256& wtxid); + void AddToTransparentSpends(const COutPoint& outpoint, const uint256& wtxid); + void AddToSproutSpends(const uint256& nullifier, const uint256& wtxid); void AddToSpends(const uint256& wtxid); public: