wallet.get_tx_parents: explicitly handle missing "from address"
(happened to work even without this)
This commit is contained in:
@@ -787,7 +787,7 @@ class AddressSynchronizer(Logger, EventListener):
|
|||||||
self.db.add_num_inputs_to_tx(txid, len(tx.inputs()))
|
self.db.add_num_inputs_to_tx(txid, len(tx.inputs()))
|
||||||
return fee
|
return fee
|
||||||
|
|
||||||
def get_addr_io(self, address):
|
def get_addr_io(self, address: str):
|
||||||
with self.lock, self.transaction_lock:
|
with self.lock, self.transaction_lock:
|
||||||
h = self.get_address_history(address).items()
|
h = self.get_address_history(address).items()
|
||||||
received = {}
|
received = {}
|
||||||
|
|||||||
@@ -922,6 +922,8 @@ class Abstract_Wallet(ABC, Logger, EventListener):
|
|||||||
parents.append(_txid)
|
parents.append(_txid)
|
||||||
# detect address reuse
|
# detect address reuse
|
||||||
addr = self.adb.get_txin_address(txin)
|
addr = self.adb.get_txin_address(txin)
|
||||||
|
if addr is None:
|
||||||
|
continue
|
||||||
received, sent = self.adb.get_addr_io(addr)
|
received, sent = self.adb.get_addr_io(addr)
|
||||||
if len(sent) > 1:
|
if len(sent) > 1:
|
||||||
my_txid, my_height, my_pos = sent[txin.prevout.to_str()]
|
my_txid, my_height, my_pos = sent[txin.prevout.to_str()]
|
||||||
|
|||||||
Reference in New Issue
Block a user