spend: check for either p2wsh or Taproot sigs in sanity checks

This commit is contained in:
Antoine Poinsot 2024-02-27 11:27:38 +01:00
parent e05039f67b
commit 714bd3c4ed
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -114,7 +114,7 @@ fn sanity_check_psbt(
// index set for signing devices to recognize them as ours.
let mut value_in = 0;
for psbtin in psbt.inputs.iter() {
if psbtin.bip32_derivation.is_empty() {
if psbtin.bip32_derivation.is_empty() && psbtin.tap_key_origins.is_empty() {
return Err(SpendCreationError::SanityCheckFailure(psbt.clone()));
}
value_in += psbtin