You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, in lightning-transaction-sync, we'd remove an output from our list of watched_outputs once we see its spend confirmed on-chain. If now a reorg happens we'd gladly unconfirm the spending tx, however, we would currently not re-add the spent output to be watched.
In order to fix this we could consider to
Keep additional tracking state around that would allow us to match any unconfirmed txid to the originally registered WatchedOutput and then simply re-add it to watched_outputs or
Take a reference to ChainMonitor/ChannelMonitors and call load_outputs_to_watch on the start of each sync round. This would allow us to always retrieve the newest items to watch on a per-round basis. However, this would also exclude us from using lightning-transaction-sync with any objects besides the core LDK ones. (we could however also consider making a method similar to load_outputs_to_watch to Filter to accommodate for this) or
Have ChannelMonitors re-register the affected outputs to watch once we inform them about spending transaction unconfirmation.
I'm not the biggest fan of 2), but considering 1)/3).
The text was updated successfully, but these errors were encountered:
Currently, in
lightning-transaction-sync
, we'd remove an output from our list ofwatched_outputs
once we see its spend confirmed on-chain. If now a reorg happens we'd gladly unconfirm the spending tx, however, we would currently not re-add the spent output to be watched.In order to fix this we could consider to
WatchedOutput
and then simply re-add it towatched_outputs
orChainMonitor
/ChannelMonitor
s and callload_outputs_to_watch
on the start of eachsync
round. This would allow us to always retrieve the newest items to watch on a per-round basis. However, this would also exclude us from usinglightning-transaction-sync
with any objects besides the core LDK ones. (we could however also consider making a method similar toload_outputs_to_watch
toFilter
to accommodate for this) orChannelMonitor
s re-register the affected outputs to watch once we inform them about spending transaction unconfirmation.I'm not the biggest fan of 2), but considering 1)/3).
The text was updated successfully, but these errors were encountered: