add/remove transaction: remove unused tx_height parameter
This commit is contained in:
parent
e9b346ed29
commit
d69da1ef43
@ -251,7 +251,7 @@ class Abstract_Wallet(object):
|
|||||||
tx = self.transactions.get(tx_hash)
|
tx = self.transactions.get(tx_hash)
|
||||||
if tx is not None:
|
if tx is not None:
|
||||||
tx.deserialize()
|
tx.deserialize()
|
||||||
self.add_transaction(tx_hash, tx, tx_height)
|
self.add_transaction(tx_hash, tx)
|
||||||
if save:
|
if save:
|
||||||
self.storage.put('addr_history', self.history, True)
|
self.storage.put('addr_history', self.history, True)
|
||||||
|
|
||||||
@ -693,7 +693,7 @@ class Abstract_Wallet(object):
|
|||||||
print_error("found pay-to-pubkey address:", addr)
|
print_error("found pay-to-pubkey address:", addr)
|
||||||
return addr
|
return addr
|
||||||
|
|
||||||
def add_transaction(self, tx_hash, tx, tx_height):
|
def add_transaction(self, tx_hash, tx):
|
||||||
is_coinbase = tx.inputs[0].get('is_coinbase') == True
|
is_coinbase = tx.inputs[0].get('is_coinbase') == True
|
||||||
with self.transaction_lock:
|
with self.transaction_lock:
|
||||||
# add inputs
|
# add inputs
|
||||||
@ -744,7 +744,7 @@ class Abstract_Wallet(object):
|
|||||||
# save
|
# save
|
||||||
self.transactions[tx_hash] = tx
|
self.transactions[tx_hash] = tx
|
||||||
|
|
||||||
def remove_transaction(self, tx_hash, tx_height):
|
def remove_transaction(self, tx_hash):
|
||||||
with self.transaction_lock:
|
with self.transaction_lock:
|
||||||
print_error("removing tx from history", tx_hash)
|
print_error("removing tx from history", tx_hash)
|
||||||
#tx = self.transactions.pop(tx_hash)
|
#tx = self.transactions.pop(tx_hash)
|
||||||
@ -770,7 +770,7 @@ class Abstract_Wallet(object):
|
|||||||
|
|
||||||
|
|
||||||
def receive_tx_callback(self, tx_hash, tx, tx_height):
|
def receive_tx_callback(self, tx_hash, tx, tx_height):
|
||||||
self.add_transaction(tx_hash, tx, tx_height)
|
self.add_transaction(tx_hash, tx)
|
||||||
#self.network.pending_transactions_for_notifications.append(tx)
|
#self.network.pending_transactions_for_notifications.append(tx)
|
||||||
self.add_unverified_tx(tx_hash, tx_height)
|
self.add_unverified_tx(tx_hash, tx_height)
|
||||||
|
|
||||||
@ -784,7 +784,7 @@ class Abstract_Wallet(object):
|
|||||||
# remove tx if it's not referenced in histories
|
# remove tx if it's not referenced in histories
|
||||||
self.tx_addr_hist[tx_hash].remove(addr)
|
self.tx_addr_hist[tx_hash].remove(addr)
|
||||||
if not self.tx_addr_hist[tx_hash]:
|
if not self.tx_addr_hist[tx_hash]:
|
||||||
self.remove_transaction(tx_hash, height)
|
self.remove_transaction(tx_hash)
|
||||||
|
|
||||||
self.history[addr] = hist
|
self.history[addr] = hist
|
||||||
self.storage.put('addr_history', self.history, True)
|
self.storage.put('addr_history', self.history, True)
|
||||||
@ -800,7 +800,7 @@ class Abstract_Wallet(object):
|
|||||||
tx = self.transactions.get(tx_hash)
|
tx = self.transactions.get(tx_hash)
|
||||||
if tx is not None and self.txi.get(tx_hash, {}).get(addr) is None and self.txo.get(tx_hash, {}).get(addr) is None:
|
if tx is not None and self.txi.get(tx_hash, {}).get(addr) is None and self.txo.get(tx_hash, {}).get(addr) is None:
|
||||||
tx.deserialize()
|
tx.deserialize()
|
||||||
self.add_transaction(tx_hash, tx, tx_height)
|
self.add_transaction(tx_hash, tx)
|
||||||
|
|
||||||
|
|
||||||
def get_history(self, domain=None):
|
def get_history(self, domain=None):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user