forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin#25273: wallet: Pass through transaction locktime and pr…
…eset input sequences and scripts to CreateTransaction 0295b44 wallet: return CreatedTransactionResult from FundTransaction (Andrew Chow) 758501b wallet: use optional for change position as an optional in CreateTransaction (Andrew Chow) 2d39db7 wallet: Explicitly preserve scriptSig and scriptWitness in CreateTransaction (Andrew Chow) 14e5074 wallet: Explicitly preserve transaction version in CreateTransaction (Andrew Chow) 0fefcbb wallet: Explicitly preserve transaction locktime in CreateTransaction (Andrew Chow) 4d335bb wallet: Set preset input sequence through coin control (Andrew Chow) 596642c wallet: Replace SelectExternal with SetTxOut (Andrew Chow) 5321786 coincontrol: Replace HasInputWeight with returning optional from Get (Andrew Chow) e1abfb5 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 bitcoin@0295b44 S3RK: Code review ACK 0295b44 Tree-SHA512: 016be4d41cbf97e1938506e70959bb5335b87006162a1c1c62fa0adb637cbe7aefb76d342b8efad5f37dc693f270c8d0a0839e239fd1ac32c6941a8172f1a710
- Loading branch information
Showing
12 changed files
with
315 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.