Skip to content

Commit

Permalink
Merge ElementsProject#660: FundTransaction: mark all change keys as kept
Browse files Browse the repository at this point in the history
dd757ad FundTransaction: mark all change keys as kept (Gregory Sanders)

Pull request description:

  Regression from 0.14 due to internal API changes.

  If a key has already been marked returned it's a nop.

Tree-SHA512: c3842f17a9f6032500491c303bf0bc47b05d1f1fb7b6f37b55fc0815d7b20b30be97e34793526288dccee449e3939df8d6dc79899c1adcb3cf6abf8713700dee
  • Loading branch information
instagibbs committed Jun 13, 2019
2 parents ee642f5 + dd757ad commit d54d02b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2866,6 +2866,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;
}

Expand Down

0 comments on commit d54d02b

Please sign in to comment.