Commit 77b0f0f
committed
Don't double-claim MPP payments that are pending on multiple chans
On startup, we walk the preimages and payment HTLC sets on all our
`ChannelMonitor`s, re-claiming all payments which we recently
claimed. This ensures all HTLCs in any claimed payments are claimed
across all channels.
In doing so, we expect to see the same payment multiple times,
after all it may have been received as multiple HTLCs across
multiple channels. In such cases, there's no reason to redundantly
claim the same set of HTLCs again and again. In the current code,
doing so may lead to redundant `PaymentClaimed` events, and in a
coming commit will instead cause an assertion failure.1 parent 656856f commit 77b0f0f
2 files changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
1188 | | - | |
| 1188 | + | |
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
| |||
14159 | 14159 | | |
14160 | 14160 | | |
14161 | 14161 | | |
| 14162 | + | |
14162 | 14163 | | |
14163 | 14164 | | |
14164 | 14165 | | |
14165 | 14166 | | |
| 14167 | + | |
| 14168 | + | |
| 14169 | + | |
| 14170 | + | |
| 14171 | + | |
| 14172 | + | |
| 14173 | + | |
14166 | 14174 | | |
14167 | 14175 | | |
14168 | 14176 | | |
| |||
14217 | 14225 | | |
14218 | 14226 | | |
14219 | 14227 | | |
| 14228 | + | |
14220 | 14229 | | |
14221 | 14230 | | |
14222 | 14231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
903 | | - | |
| 903 | + | |
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
| |||
0 commit comments