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
Use outpoint creation height when restoring locktimed packages
When we have an outpoint to claim which is lock-timed and the
locktime is reached, we add it to
`OnchainTxHandler::claimable_outpoints` to indicate the outpoint is
now being claimed. However, `claimable_outpoints` is supposed to
track when the outpoint first appeared on chain so that we can
remove the claim if the outpoint is reorged out.
Sadly, in the handling for lock-timed packages, we incorrectly
stored the current height in `claimable_outpoints`, causing such
claims to be removed in case of a reorg right after they were
generated, even if the output we intend to claim isn't removed at
all.
Here we use the creation-height tracking added in the previous
commit to actually address the issue, using the tracked height when
adding a claim to `OnchainTxHandler::claimable_outpoints`.
In cases where we have no information, we continue to use the
current height, retaining the issue for locktimed packages on
upgrades, but this simplifies cases where we actually don't have
the information available anyway.
0 commit comments