1
0

always pass coins to wallet.make_unsigned_transactions. fix \! shortcut in commands

This commit is contained in:
ThomasV
2015-05-31 11:31:41 +02:00
parent 0531f00c80
commit 5cd3bfedb6
4 changed files with 27 additions and 25 deletions

View File

@@ -840,16 +840,12 @@ class Abstract_Wallet(object):
fee = MIN_RELAY_TX_FEE
return fee
def make_unsigned_transaction(self, outputs, fixed_fee=None, change_addr=None, domain=None, coins=None ):
def make_unsigned_transaction(self, coins, outputs, fixed_fee=None, change_addr=None):
# check outputs
for type, data, value in outputs:
if type == 'address':
assert is_address(data), "Address " + data + " is invalid!"
# get coins
if not coins:
coins = self.get_spendable_coins(domain)
amount = sum(map(lambda x:x[2], outputs))
total = fee = 0
inputs = []
@@ -923,8 +919,9 @@ class Abstract_Wallet(object):
run_hook('make_unsigned_transaction', tx)
return tx
def mktx(self, outputs, password, fee=None, change_addr=None, domain= None, coins = None ):
tx = self.make_unsigned_transaction(outputs, fee, change_addr, domain, coins)
def mktx(self, outputs, password, fee=None, change_addr=None, domain=None):
coins = self.get_spendable_coins(domain)
tx = self.make_unsigned_transaction(coins, outputs, fee, change_addr)
self.sign_transaction(tx, password)
return tx