diff --git a/electrum/transaction.py b/electrum/transaction.py index 2f105ebec..aa071fbfb 100644 --- a/electrum/transaction.py +++ b/electrum/transaction.py @@ -253,6 +253,8 @@ class TxInput: return d def witness_elements(self)-> Sequence[bytes]: + if not self.witness: + return [] vds = BCDataStream() vds.write(self.witness) n = vds.read_compact_size()