follow-up prev
E/W | lnwatcher.LNWalletWatcher | Exception in on_network_update: AssertionError('None')
Traceback (most recent call last):
File "...\electrum\electrum\util.py", line 1035, in wrapper
return await func(*args, **kwargs)
File "...\electrum\electrum\lnwatcher.py", line 174, in on_network_update
await self.check_onchain_situation(address, outpoint)
File "...\electrum\electrum\lnwatcher.py", line 184, in check_onchain_situation
closing_height = self.get_tx_height(closing_txid)
File "...\electrum\electrum\address_synchronizer.py", line 597, in get_tx_height
verified_tx_mined_info = self.db.get_verified_tx(tx_hash)
File "...\electrum\electrum\json_db.py", line 44, in wrapper
return func(self, *args, **kwargs)
File "...\electrum\electrum\wallet_db.py", line 859, in get_verified_tx
assert isinstance(txid, str), f"{repr(txid)}"
AssertionError: None
This commit is contained in:
@@ -584,7 +584,7 @@ class AddressSynchronizer(Logger):
|
|||||||
return cached_local_height
|
return cached_local_height
|
||||||
return self.network.get_local_height() if self.network else self.db.get('stored_height', 0)
|
return self.network.get_local_height() if self.network else self.db.get('stored_height', 0)
|
||||||
|
|
||||||
def add_future_tx(self, tx: Transaction, num_blocks: int) -> None:
|
def add_future_tx(self, tx: Transaction, num_blocks: int) -> bool:
|
||||||
assert num_blocks > 0, num_blocks
|
assert num_blocks > 0, num_blocks
|
||||||
with self.lock:
|
with self.lock:
|
||||||
tx_was_added = self.add_transaction(tx)
|
tx_was_added = self.add_transaction(tx)
|
||||||
@@ -593,6 +593,8 @@ class AddressSynchronizer(Logger):
|
|||||||
return tx_was_added
|
return tx_was_added
|
||||||
|
|
||||||
def get_tx_height(self, tx_hash: str) -> TxMinedInfo:
|
def get_tx_height(self, tx_hash: str) -> TxMinedInfo:
|
||||||
|
if tx_hash is None: # ugly backwards compat...
|
||||||
|
return TxMinedInfo(height=TX_HEIGHT_LOCAL, conf=0)
|
||||||
with self.lock:
|
with self.lock:
|
||||||
verified_tx_mined_info = self.db.get_verified_tx(tx_hash)
|
verified_tx_mined_info = self.db.get_verified_tx(tx_hash)
|
||||||
if verified_tx_mined_info:
|
if verified_tx_mined_info:
|
||||||
|
|||||||
Reference in New Issue
Block a user