|
@ -577,7 +577,6 @@ class Abstract_Wallet(object): |
|
|
coins = self.get_unspent_coins(domain) |
|
|
coins = self.get_unspent_coins(domain) |
|
|
|
|
|
|
|
|
inputs = [] |
|
|
inputs = [] |
|
|
|
|
|
|
|
|
for item in coins: |
|
|
for item in coins: |
|
|
if item.get('coinbase') and item.get('height') + COINBASE_MATURITY > self.network.get_local_height(): |
|
|
if item.get('coinbase') and item.get('height') + COINBASE_MATURITY > self.network.get_local_height(): |
|
|
continue |
|
|
continue |
|
@ -588,9 +587,9 @@ class Abstract_Wallet(object): |
|
|
if total >= amount + fee: break |
|
|
if total >= amount + fee: break |
|
|
else: |
|
|
else: |
|
|
inputs = [] |
|
|
inputs = [] |
|
|
|
|
|
|
|
|
return inputs, total, fee |
|
|
return inputs, total, fee |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_fee(self, fee): |
|
|
def set_fee(self, fee): |
|
|
if self.fee != fee: |
|
|
if self.fee != fee: |
|
|
self.fee = fee |
|
|
self.fee = fee |
|
@ -619,7 +618,6 @@ class Abstract_Wallet(object): |
|
|
# Insert the change output at a random position in the outputs |
|
|
# Insert the change output at a random position in the outputs |
|
|
posn = random.randint(0, len(outputs)) |
|
|
posn = random.randint(0, len(outputs)) |
|
|
outputs[posn:posn] = [( 'address', change_addr, change_amount)] |
|
|
outputs[posn:posn] = [( 'address', change_addr, change_amount)] |
|
|
return outputs |
|
|
|
|
|
|
|
|
|
|
|
def get_history(self, address): |
|
|
def get_history(self, address): |
|
|
with self.lock: |
|
|
with self.lock: |
|
@ -753,7 +751,8 @@ class Abstract_Wallet(object): |
|
|
raise ValueError("Not enough funds") |
|
|
raise ValueError("Not enough funds") |
|
|
for txin in inputs: |
|
|
for txin in inputs: |
|
|
self.add_input_info(txin) |
|
|
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) |
|
|
return Transaction(inputs, outputs) |
|
|
|
|
|
|
|
|
def mktx(self, outputs, password, fee=None, change_addr=None, domain= None, coins = None ): |
|
|
def mktx(self, outputs, password, fee=None, change_addr=None, domain= None, coins = None ): |
|
|