Also fix backend errors caused by P2TR inputs without witness data
This commit is contained in:
parent
7432e6e29b
commit
27c70bd919
@ -460,11 +460,10 @@ export class Common {
|
|||||||
case 'v0_p2wpkh': flags |= TransactionFlags.p2wpkh; break;
|
case 'v0_p2wpkh': flags |= TransactionFlags.p2wpkh; break;
|
||||||
case 'v0_p2wsh': flags |= TransactionFlags.p2wsh; break;
|
case 'v0_p2wsh': flags |= TransactionFlags.p2wsh; break;
|
||||||
case 'v1_p2tr': {
|
case 'v1_p2tr': {
|
||||||
if (!vin.witness?.length) {
|
|
||||||
throw new Error('Taproot input missing witness data');
|
|
||||||
}
|
|
||||||
flags |= TransactionFlags.p2tr;
|
flags |= TransactionFlags.p2tr;
|
||||||
flags = Common.isInscription(vin, flags);
|
if (vin.witness?.length) {
|
||||||
|
flags = Common.isInscription(vin, flags);
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user