diff options
author | fanquake <fanquake@gmail.com> | 2023-12-11 15:13:25 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-12-11 15:29:25 +0000 |
commit | dabd7046420501a028903a68e9f185d1e347ba3e (patch) | |
tree | 508e749fc0845874701515beecae0a98a1fcae8e /src/node/interfaces.cpp | |
parent | 255004fc5e7febb1fbe2b0cdcbab3e0a5207acd9 (diff) | |
parent | 0295b44c257fe23f1ad344aff11372d67864f0db (diff) |
Merge bitcoin/bitcoin#25273: wallet: Pass through transaction locktime and preset input sequences and scripts to CreateTransaction
0295b44c257fe23f1ad344aff11372d67864f0db wallet: return CreatedTransactionResult from FundTransaction (Andrew Chow)
758501b71391136c33b525b1a0109b990d4f463e wallet: use optional for change position as an optional in CreateTransaction (Andrew Chow)
2d39db7aa128a948b6ad11242591ef26a342f5b1 wallet: Explicitly preserve scriptSig and scriptWitness in CreateTransaction (Andrew Chow)
14e50746f683361f4d511d384d6f1dc44ed2bf10 wallet: Explicitly preserve transaction version in CreateTransaction (Andrew Chow)
0fefcbb776063b7fcc03c28e544d830a2f540250 wallet: Explicitly preserve transaction locktime in CreateTransaction (Andrew Chow)
4d335bb1e00a414a4740007d5a192a73179b2262 wallet: Set preset input sequence through coin control (Andrew Chow)
596642c5a9f52dda2599b0bde424366bb22b3c6e wallet: Replace SelectExternal with SetTxOut (Andrew Chow)
5321786b9d90eaf35059bb07e6beaaa2cbb257ac coincontrol: Replace HasInputWeight with returning optional from Get (Andrew Chow)
e1abfb5b2037ca4fe5a05aa578030c8016491c8b wallet: Introduce and use PreselectedInput class in CCoinControl (Andrew Chow)
Pull request description:
Currently `FundTransaction` handles transaction locktime and preset input data by extracting the selected inputs and change output from `CreateTransaction`'s results. This means that `CreateTransaction` is actually unaware of any user desired locktime or sequence numbers. This can have an effect on whether and how anti-fee-sniping works.
This PR makes `CreateTransaction` aware of the locktime and preset input data by providing them to `CCoinControl`. `CreateTransasction` will then set the sequences, scriptSigs, scriptWItnesses, and locktime as appropriate if they are specified. This allows `FundTransaction` to actually use `CreateTransaction`'s result directly instead of having to extract the parts of it that it wants.
Additionally `FundTransaction` will return a `CreateTransactionResult` as `CreateTransaction` does instead of having several output parameters. Lastly, instead of using `-1` as a magic number for the change output position, the change position is changed to be an optional with no value set indicating no desired change output position (when provided as an input parameter) or no change output present (in the result).
ACKs for top commit:
josibake:
ACK https://github.com/bitcoin/bitcoin/commit/0295b44c257fe23f1ad344aff11372d67864f0db
S3RK:
Code review ACK 0295b44c257fe23f1ad344aff11372d67864f0db
Tree-SHA512: 016be4d41cbf97e1938506e70959bb5335b87006162a1c1c62fa0adb637cbe7aefb76d342b8efad5f37dc693f270c8d0a0839e239fd1ac32c6941a8172f1a710
Diffstat (limited to 'src/node/interfaces.cpp')
0 files changed, 0 insertions, 0 deletions