aboutsummaryrefslogtreecommitdiff
path: root/src/psbt.h
diff options
context:
space:
mode:
authorGreg Sanders <gsanders87@gmail.com>2022-07-12 10:37:27 -0400
committerGreg Sanders <gsanders87@gmail.com>2022-10-17 11:13:02 -0400
commitd25699280af1ea45bebc884f63a10da7ea275ef9 (patch)
tree153247e252e3d768f941bf3b5af9b06ec36febaa /src/psbt.h
parenta52ff619a45c760f657413cbd40e1e2226068541 (diff)
downloadbitcoin-d25699280af1ea45bebc884f63a10da7ea275ef9.tar.xz
Verify PSBT inputs rather than check for fields being empty
Diffstat (limited to 'src/psbt.h')
-rw-r--r--src/psbt.h5
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