Update CWallet::MarkAffectedTransactionsDirty() for Sapling.

This commit is contained in:
Simon
2018-07-28 10:02:48 -07:00
parent a132719da5
commit dae1c4204a
2 changed files with 11 additions and 1 deletions

View File

@@ -1389,6 +1389,14 @@ void CWallet::MarkAffectedTransactionsDirty(const CTransaction& tx)
} }
} }
} }
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)

View File

@@ -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;