1
0

qml: history: add some support for future txs

- they are now distinguished from local by the status text "in %d blocks"
- this status text needs updating occasionally: on new blocks,
  and some lnwatcher interactions, hence new event: "adb_set_future_tx"
This commit is contained in:
SomberNight
2023-04-04 15:58:49 +00:00
parent 76f795bc9a
commit f8f0af4a2f
2 changed files with 47 additions and 8 deletions

View File

@@ -662,7 +662,10 @@ class AddressSynchronizer(Logger, EventListener):
In case of a CSV-locked tx with unconfirmed inputs, the wanted_height is a best-case guess.
"""
with self.lock:
old_height = self.future_tx.get(txid) or None
self.future_tx[txid] = wanted_height
if old_height != wanted_height:
util.trigger_callback('adb_set_future_tx', self, txid)
def get_tx_height(self, tx_hash: str) -> TxMinedInfo:
if tx_hash is None: # ugly backwards compat...