Handle missing inner_redeemscript

This commit is contained in:
Mononaut 2024-03-03 16:01:13 +00:00
parent 882e8ec598
commit eadbc139fa
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -145,6 +145,10 @@ class TransactionUtils {
}
public countScriptSigops(script: string, isRawScript: boolean = false, witness: boolean = false): number {
if (!script?.length) {
return 0;
}
let sigops = 0;
// count OP_CHECKSIG and OP_CHECKSIGVERIFY
sigops += (script.match(/OP_CHECKSIG/g)?.length || 0);