From fc2c119c4d26d2cd31107dd2c0f7d427e4374403 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 19 Jan 2018 03:48:58 +0400 Subject: [PATCH] Segwit deserialize True by default --- pybtc/blockchain.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pybtc/blockchain.py b/pybtc/blockchain.py index ff731c9..efe8ae4 100644 --- a/pybtc/blockchain.py +++ b/pybtc/blockchain.py @@ -377,9 +377,7 @@ class Transaction(): scriptCode += b'\x14' + pubkey_hash160 + OPCODE["OP_EQUALVERIFY"] + OPCODE["OP_CHECKSIG"] self.tx_in[input_index].sig_script = Script(b'\x16\x00\x14' + pubkey_hash160) # P2WPKHredeemScript sighash = self.sighash_segwit(sighash_type, input_index, scriptCode, amount) - print(sighash) signature = sign_message(sighash, private_key) + sighash_type.to_bytes(1,'little') - print(signature) self.witness[input_index] = Witness([signature, pubkey]) self.recalculate_txid()