tadd hook: make_unsigned_transaction - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 5a20d07fb85b62ef2c7433cfceba7e0259da8dba DIR parent cc71dfea863cce0a1f497a8524141e76cad824e2 HTML Author: ThomasV <thomasv@gitorious> Date: Tue, 2 Sep 2014 07:47:54 +0200 add hook: make_unsigned_transaction Diffstat: M lib/wallet.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -577,7 +577,6 @@ class Abstract_Wallet(object): coins = self.get_unspent_coins(domain) inputs = [] - for item in coins: if item.get('coinbase') and item.get('height') + COINBASE_MATURITY > self.network.get_local_height(): continue t@@ -588,9 +587,9 @@ class Abstract_Wallet(object): if total >= amount + fee: break else: inputs = [] - return inputs, total, fee + def set_fee(self, fee): if self.fee != fee: self.fee = fee t@@ -619,7 +618,6 @@ class Abstract_Wallet(object): # Insert the change output at a random position in the outputs posn = random.randint(0, len(outputs)) outputs[posn:posn] = [( 'address', change_addr, change_amount)] - return outputs def get_history(self, address): with self.lock: t@@ -753,7 +751,8 @@ class Abstract_Wallet(object): raise ValueError("Not enough funds") for txin in inputs: self.add_input_info(txin) - outputs = self.add_tx_change(inputs, outputs, amount, fee, total, change_addr) + self.add_tx_change(inputs, outputs, amount, fee, total, change_addr) + run_hook('make_unsigned_transaction', inputs, outputs) return Transaction(inputs, outputs) def mktx(self, outputs, password, fee=None, change_addr=None, domain= None, coins = None ):