mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 00:05:13 +02:00
refactor: use PSBTFillOptions for filling and signing
Replace the sign, finalize , bip32derivs and sighash_type arguments which are passed to FillPSBT() and SignPSBTInput() with a PSBTFillOptions struct. This makes it easier to add additional options later without large code churn, such as avoid_script_path proposed in #32857. It also makes the use of default boolean options safer compared to positional arguments that can easily get mixed up.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <addresstype.h>
|
||||
#include <common/signmessage.h>
|
||||
#include <common/types.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <primitives/transaction_identifier.h>
|
||||
@@ -202,9 +203,7 @@ public:
|
||||
int& num_blocks) = 0;
|
||||
|
||||
//! Fill PSBT.
|
||||
virtual std::optional<common::PSBTError> fillPSBT(std::optional<int> sighash_type,
|
||||
bool sign,
|
||||
bool bip32derivs,
|
||||
virtual std::optional<common::PSBTError> fillPSBT(const common::PSBTFillOptions& options,
|
||||
size_t* n_signed,
|
||||
PartiallySignedTransaction& psbtx,
|
||||
bool& complete) = 0;
|
||||
|
||||
Reference in New Issue
Block a user