diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 7f18a7c6a..56ab1ccec 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1384,11 +1384,19 @@ void CWallet::MarkAffectedTransactionsDirty(const CTransaction& tx) for (const JSDescription& jsdesc : tx.vjoinsplit) { for (const uint256& nullifier : jsdesc.nullifiers) { if (mapSproutNullifiersToNotes.count(nullifier) && - mapWallet.count(mapSproutNullifiersToNotes[nullifier].hash)) { + mapWallet.count(mapSproutNullifiersToNotes[nullifier].hash)) { 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) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 0a1be0387..b369c0186 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -907,6 +907,8 @@ public: */ std::map mapSproutNullifiersToNotes; + std::map mapSaplingNullifiersToNotes; + std::map mapWallet; int64_t nOrderPosNext;