diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index c86ab1d269..6bc7a3d2d8 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2700,6 +2700,11 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, int& nC } } + // Mark all un-returned change keys as used to reduce privacy loss + for (auto& changekey : vChangeKey) { + changekey->KeepKey(); + } + return true; }