]> git.bitcoin.ninja Git - rust-lightning/commit
Track payments after they resolve until all HTLCs are finalized
authorMatt Corallo <git@bluematt.me>
Sun, 3 Oct 2021 22:33:12 +0000 (22:33 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 22 Oct 2021 18:41:42 +0000 (18:41 +0000)
commit5fedae85d11289d5d39ead9d7dd07079c9a4b214
tree9d187d1970383679c66070b9ad12cdbc9ee16ddc
parentf624cc9ac231d7944548ce392b0d419ee66c089a
Track payments after they resolve until all HTLCs are finalized

In the next commit, we will reload lost pending payments from
ChannelMonitors during restart. However, in order to avoid
re-adding pending payments which have already been fulfilled, we
must ensure that we do not fully remove pending payments until all
HTLCs for the payment have been fully removed from their
ChannelMonitors.

We do so here, introducing a new PendingOutboundPayment variant
called `Completed` which only tracks the set of pending HTLCs.
lightning/src/ln/channelmanager.rs