diff --git a/bitcoinlib/transactions.py b/bitcoinlib/transactions.py index 6894e70f..22ce2c4b 100644 --- a/bitcoinlib/transactions.py +++ b/bitcoinlib/transactions.py @@ -1498,7 +1498,9 @@ def parse_bytesio(cls, rawtx, strict=True, network=DEFAULT_NETWORK): inputs[n].script = script if not inputs[n].script else inputs[n].script + script inputs[n].keys = script.keys inputs[n].signatures = script.signatures - if script.script_types[0][:13] == 'p2sh_multisig' or script.script_types[0] =='signature_multisig': + if not script.signatures: + inputs[n].script_type = 'unknown' + elif script.script_types[0][:13] == 'p2sh_multisig' or script.script_types[0] =='signature_multisig': inputs[n].script_type = 'p2sh_multisig' inputs[n].redeemscript = inputs[n].witnesses[-1] elif script.script_types[0] == 'p2tr_unlock':