Update CWallet::MarkAffectedTransactionsDirty() for Sapling.
This commit is contained in:
@@ -1384,11 +1384,19 @@ void CWallet::MarkAffectedTransactionsDirty(const CTransaction& tx)
|
|||||||
for (const JSDescription& jsdesc : tx.vjoinsplit) {
|
for (const JSDescription& jsdesc : tx.vjoinsplit) {
|
||||||
for (const uint256& nullifier : jsdesc.nullifiers) {
|
for (const uint256& nullifier : jsdesc.nullifiers) {
|
||||||
if (mapSproutNullifiersToNotes.count(nullifier) &&
|
if (mapSproutNullifiersToNotes.count(nullifier) &&
|
||||||
mapWallet.count(mapSproutNullifiersToNotes[nullifier].hash)) {
|
mapWallet.count(mapSproutNullifiersToNotes[nullifier].hash)) {
|
||||||
mapWallet[mapSproutNullifiersToNotes[nullifier].hash].MarkDirty();
|
mapWallet[mapSproutNullifiersToNotes[nullifier].hash].MarkDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const SpendDescription &spend : tx.vShieldedSpend) {
|
||||||
|
uint256 nullifier = spend.nullifier;
|
||||||
|
if (mapSaplingNullifiersToNotes.count(nullifier) &&
|
||||||
|
mapWallet.count(mapSaplingNullifiersToNotes[nullifier].hash)) {
|
||||||
|
mapWallet[mapSaplingNullifiersToNotes[nullifier].hash].MarkDirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWallet::EraseFromWallet(const uint256 &hash)
|
void CWallet::EraseFromWallet(const uint256 &hash)
|
||||||
|
|||||||
@@ -907,6 +907,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
std::map<uint256, JSOutPoint> mapSproutNullifiersToNotes;
|
std::map<uint256, JSOutPoint> mapSproutNullifiersToNotes;
|
||||||
|
|
||||||
|
std::map<uint256, SaplingOutPoint> mapSaplingNullifiersToNotes;
|
||||||
|
|
||||||
std::map<uint256, CWalletTx> mapWallet;
|
std::map<uint256, CWalletTx> mapWallet;
|
||||||
|
|
||||||
int64_t nOrderPosNext;
|
int64_t nOrderPosNext;
|
||||||
|
|||||||
Reference in New Issue
Block a user