tMerge pull request #3032 from SomberNight/non_sw_txin_witness - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 633d44f26850bb3523f850732f5fe26ffc45029e (DIR) parent 8c55bbd1f31f67fd9a104f2cdca4fe508753b68a (HTM) Author: ThomasV <thomasv@electrum.org> Date: Thu, 12 Oct 2017 22:38:01 +0200 Merge pull request #3032 from SomberNight/non_sw_txin_witness fix: witness for non-segwit txins Diffstat: M lib/transaction.py | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) --- (DIR) diff --git a/lib/transaction.py b/lib/transaction.py t@@ -637,6 +637,8 @@ class Transaction: @classmethod def serialize_witness(self, txin): + if not self.is_segwit_input(txin): + return '00' pubkeys, sig_list = self.get_siglist(txin) if txin['type'] in ['p2wpkh', 'p2wpkh-p2sh']: witness = var_int(2) + push_script(sig_list[0]) + push_script(pubkeys[0])