Commit 8106dbf
committed
Rebuild pending payments list before replaying pending claims/fails
On `ChannelManager` reload we rebuild the pending outbound payments
list by looking for any missing payments in `ChannelMonitor`s.
However, in the same loop over `ChannelMonitor`s, we also re-claim
any pending payments which we see we have a payment preimage for.
If we send an MPP payment across different chanels, the result may
be that we'll iterate the loop, and in each iteration add a
pending payment with only one known path, then claim/fail it and
remove the pending apyment (at least for the claim case). This may
result in spurious extra events, or even both a `PaymentFailed` and
`PaymentSent` event on startup for the same payment.1 parent a8ec966 commit 8106dbf
1 file changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16451 | 16451 | | |
16452 | 16452 | | |
16453 | 16453 | | |
| 16454 | + | |
| 16455 | + | |
| 16456 | + | |
16454 | 16457 | | |
16455 | 16458 | | |
16456 | 16459 | | |
| |||
16489 | 16492 | | |
16490 | 16493 | | |
16491 | 16494 | | |
| 16495 | + | |
| 16496 | + | |
| 16497 | + | |
| 16498 | + | |
| 16499 | + | |
| 16500 | + | |
| 16501 | + | |
| 16502 | + | |
| 16503 | + | |
| 16504 | + | |
| 16505 | + | |
| 16506 | + | |
16492 | 16507 | | |
16493 | 16508 | | |
16494 | 16509 | | |
| |||
0 commit comments