Merge #662: [0.17 backport] FundTransaction: mark all change keys as kept #660

e50cbd7 FundTransaction: mark all change keys as kept (Gregory Sanders)

Pull request description:

  Backport of https://github.com/ElementsProject/elements/pull/660.

Tree-SHA512: 0fdeddc109c8f1f69b5a45c8a23171cebb68db7f21f7125a7769d28a3a7ed090602b28a1ec51b9a89a96becad07051b89951db1fef91fddc53f1f648099196da
This commit is contained in:
Gregory Sanders 2019-06-13 09:33:24 -04:00
commit 8b93cee2fd
No known key found for this signature in database
GPG key ID: F3F68E2D86A48FDB

View file

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