From 79bda98ba254f021ca154d8265a1ed2a2ece1f89 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 18 Apr 2017 10:47:11 +0200 Subject: [PATCH] cleanup unused code --- lib/transaction.py | 3 --- plugins/ledger/ledger.py | 2 -- 2 files changed, 5 deletions(-) diff --git a/lib/transaction.py b/lib/transaction.py index 315bf982..7ccf4719 100644 --- a/lib/transaction.py +++ b/lib/transaction.py @@ -724,10 +724,7 @@ class Transaction: outpoint = self.serialize_outpoint(txin) pubkey = txin['pubkeys'][0] pkh = bitcoin.hash_160(pubkey.decode('hex')).encode('hex') - redeemScript = '00' + push_script(pkh) scriptCode = push_script('76a9' + push_script(pkh) + '88ac') - script_hash = bitcoin.hash_160(redeemScript.decode('hex')).encode('hex') - scriptPubKey = 'a9' + push_script(script_hash) + '87' amount = int_to_hex(txin['value'], 8) nSequence = int_to_hex(txin.get('sequence', 0xffffffff), 4) preimage = nVersion + hashPrevouts + hashSequence + outpoint + scriptCode + amount + nSequence + hashOutputs + nLocktime + nHashType diff --git a/plugins/ledger/ledger.py b/plugins/ledger/ledger.py index d28eb53f..73ccaa81 100644 --- a/plugins/ledger/ledger.py +++ b/plugins/ledger/ledger.py @@ -273,7 +273,6 @@ class Ledger_KeyStore(Hardware_KeyStore): outputAmount = None p2shTransaction = False segwitTransaction = False - reorganize = False pin = "" self.get_client() # prompt for the PIN before displaying the dialog if necessary @@ -400,7 +399,6 @@ class Ledger_KeyStore(Hardware_KeyStore): if not p2shTransaction: outputData = self.get_client().finalizeInput(output, format_satoshis_plain(outputAmount), format_satoshis_plain(tx.get_fee()), changePath, bytearray(rawTx.decode('hex'))) - reorganize = True else: outputData = self.get_client().finalizeInputFull(txOutput) outputData['outputData'] = txOutput