Skip to content

Commit e3068e3

Browse files
committed
FundTransaction: mark all change keys are kept
1 parent 427903d commit e3068e3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/wallet/wallet.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2711,6 +2711,11 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, int& nC
27112711
}
27122712
}
27132713

2714+
// Mark all un-returned change keys as used to reduce privacy loss
2715+
for (auto& changekey : vChangeKey) {
2716+
changekey->KeepKey();
2717+
}
2718+
27142719
return true;
27152720
}
27162721

0 commit comments

Comments
 (0)