diff options
author | Greg Sanders <gsanders87@gmail.com> | 2022-07-12 10:37:27 -0400 |
---|---|---|
committer | Greg Sanders <gsanders87@gmail.com> | 2022-10-17 11:13:02 -0400 |
commit | d25699280af1ea45bebc884f63a10da7ea275ef9 (patch) | |
tree | 153247e252e3d768f941bf3b5af9b06ec36febaa /src/psbt.h | |
parent | a52ff619a45c760f657413cbd40e1e2226068541 (diff) |
Verify PSBT inputs rather than check for fields being empty
Diffstat (limited to 'src/psbt.h')
-rw-r--r-- | src/psbt.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/psbt.h b/src/psbt.h index ddcdb8c68d..37bf142366 100644 --- a/src/psbt.h +++ b/src/psbt.h @@ -1218,9 +1218,12 @@ std::string PSBTRoleName(PSBTRole role); /** Compute a PrecomputedTransactionData object from a psbt. */ PrecomputedTransactionData PrecomputePSBTData(const PartiallySignedTransaction& psbt); -/** Checks whether a PSBTInput is already signed. */ +/** Checks whether a PSBTInput is already signed by checking for non-null finalized fields. */ bool PSBTInputSigned(const PSBTInput& input); +/** Checks whether a PSBTInput is already signed by doing script verification using final fields. */ +bool PSBTInputSignedAndVerified(const PartiallySignedTransaction psbt, unsigned int input_index, const PrecomputedTransactionData* txdata); + /** Signs a PSBTInput, verifying that all provided data matches what is being signed. * * txdata should be the output of PrecomputePSBTData (which can be shared across |