Rename CWallet::AddToSpends methods for clarity.
This commit is contained in:
parent
f41bf503e1
commit
d5e490d9f2
|
@ -725,7 +725,7 @@ bool CWallet::IsSpent(const uint256& nullifier) const
|
||||||
return false;
|
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));
|
mapTxSpends.insert(make_pair(outpoint, wtxid));
|
||||||
|
|
||||||
|
@ -734,7 +734,7 @@ void CWallet::AddToSpends(const COutPoint& outpoint, const uint256& wtxid)
|
||||||
SyncMetaData<COutPoint>(range);
|
SyncMetaData<COutPoint>(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));
|
mapTxNullifiers.insert(make_pair(nullifier, wtxid));
|
||||||
|
|
||||||
|
@ -751,11 +751,11 @@ void CWallet::AddToSpends(const uint256& wtxid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (const CTxIn& txin : thisTx.vin) {
|
for (const CTxIn& txin : thisTx.vin) {
|
||||||
AddToSpends(txin.prevout, wtxid);
|
AddToTransparentSpends(txin.prevout, wtxid);
|
||||||
}
|
}
|
||||||
for (const JSDescription& jsdesc : thisTx.vjoinsplit) {
|
for (const JSDescription& jsdesc : thisTx.vjoinsplit) {
|
||||||
for (const uint256& nullifier : jsdesc.nullifiers) {
|
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.GetHash().ToString(),
|
||||||
wtxIn.hashBlock.ToString());
|
wtxIn.hashBlock.ToString());
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
|
AddToSproutSpends(hash);
|
||||||
|
=======
|
||||||
AddToSpends(hash);
|
AddToSpends(hash);
|
||||||
|
AddToSaplingSpends(hash);
|
||||||
|
>>>>>>> e9b1ce0... fix
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fUpdated = false;
|
bool fUpdated = false;
|
||||||
|
|
|
@ -717,8 +717,8 @@ private:
|
||||||
typedef TxSpendMap<uint256> TxNullifiers;
|
typedef TxSpendMap<uint256> TxNullifiers;
|
||||||
TxNullifiers mapTxNullifiers;
|
TxNullifiers mapTxNullifiers;
|
||||||
|
|
||||||
void AddToSpends(const COutPoint& outpoint, const uint256& wtxid);
|
void AddToTransparentSpends(const COutPoint& outpoint, const uint256& wtxid);
|
||||||
void AddToSpends(const uint256& nullifier, const uint256& wtxid);
|
void AddToSproutSpends(const uint256& nullifier, const uint256& wtxid);
|
||||||
void AddToSpends(const uint256& wtxid);
|
void AddToSpends(const uint256& wtxid);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue