mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-11 08:07:33 +02:00
psbt: Return PSBTError from SignPSBTInput
SignPSBTInput will need to report the specific things that caused an error to callers, so change it to return a PSBTError. Additionally some callers will now check the return value and report an error to the user. Currently, this should not change any behavior as the things that SignPBSTInput will error on are all first checked by its callers.
This commit is contained in:
@@ -235,7 +235,8 @@ PartiallySignedTransaction ProcessPSBT(const std::string& psbt_string, const std
|
||||
// Note that SignPSBTInput does a lot more than just constructing ECDSA signatures.
|
||||
// We only actually care about those if our signing provider doesn't hide private
|
||||
// information, as is the case with `descriptorprocesspsbt`
|
||||
SignPSBTInput(provider, psbtx, /*index=*/i, &txdata, sighash_type, /*out_sigdata=*/nullptr, finalize);
|
||||
// As such, we ignore the return value as any errors just mean that we do not have enough information.
|
||||
(void)SignPSBTInput(provider, psbtx, /*index=*/i, &txdata, sighash_type, /*out_sigdata=*/nullptr, finalize);
|
||||
}
|
||||
|
||||
// Update script/keypath information using descriptor data.
|
||||
|
||||
Reference in New Issue
Block a user