mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
[wallet] randomly generate change targets
If the wallet always chooses 1 million sats as its change target, it is easier to fingerprint transactions created by the Core wallet.
This commit is contained in:
@@ -442,7 +442,9 @@ def test_watchonly_psbt(self, peer_node, rbf_node, dest_address):
|
||||
self.generate(peer_node, 1)
|
||||
|
||||
# Create single-input PSBT for transaction to be bumped
|
||||
psbt = watcher.walletcreatefundedpsbt([], {dest_address: 0.0005}, 0, {"fee_rate": 1}, True)['psbt']
|
||||
# Ensure the payment amount + change can be fully funded using one of the 0.001BTC inputs.
|
||||
psbt = watcher.walletcreatefundedpsbt([watcher.listunspent()[0]], {dest_address: 0.0005}, 0,
|
||||
{"fee_rate": 1, "add_inputs": False}, True)['psbt']
|
||||
psbt_signed = signer.walletprocesspsbt(psbt=psbt, sign=True, sighashtype="ALL", bip32derivs=True)
|
||||
psbt_final = watcher.finalizepsbt(psbt_signed["psbt"])
|
||||
original_txid = watcher.sendrawtransaction(psbt_final["hex"])
|
||||
|
||||
Reference in New Issue
Block a user