Commit a80c855
committed
Block RAA
We added the ability to block `ChannelMonitorUpdate`s on receipt of
an RAA in order to avoid dropping a payment preimage from a channel
that created a `PaymentSent` event in
9ede794. We did not at the time
use the same infrastructure for `PaymentClaimed` events, but really
should have. While a `PaymentClaimed` event may seem a bit less
critical than a `PaymentSent` event (it doesn't contain a payment
preimage that the user needs to make sure they store for proof of
payment), its still important for users to ensure their payment
tracking logic is always correct.
Here we take the (relatively straightforward) action of setting a
`EventCompletionAction` to block RAA monitor updates on channels
which created a `PaymentClaimed` event. Note that we only block one
random channel from an MPP paymnet, not all of them, as any single
channel should provide enough information for us to recreate the
`PaymentClaimed` event on restart.ChannelMonitorUpdates on PaymentClaimed events1 parent 10df89d commit a80c855
File tree
5 files changed
+126
-13
lines changed- lightning/src/ln
5 files changed
+126
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
| 1398 | + | |
1398 | 1399 | | |
1399 | 1400 | | |
1400 | 1401 | | |
| |||
1403 | 1404 | | |
1404 | 1405 | | |
1405 | 1406 | | |
| 1407 | + | |
1406 | 1408 | | |
1407 | 1409 | | |
1408 | 1410 | | |
| |||
1426 | 1428 | | |
1427 | 1429 | | |
1428 | 1430 | | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | 1431 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4694 | 4694 | | |
4695 | 4695 | | |
4696 | 4696 | | |
| 4697 | + | |
| 4698 | + | |
| 4699 | + | |
| 4700 | + | |
| 4701 | + | |
| 4702 | + | |
| 4703 | + | |
| 4704 | + | |
| 4705 | + | |
| 4706 | + | |
| 4707 | + | |
| 4708 | + | |
| 4709 | + | |
| 4710 | + | |
| 4711 | + | |
| 4712 | + | |
| 4713 | + | |
4697 | 4714 | | |
4698 | 4715 | | |
4699 | 4716 | | |
| |||
4713 | 4730 | | |
4714 | 4731 | | |
4715 | 4732 | | |
| 4733 | + | |
| 4734 | + | |
| 4735 | + | |
4716 | 4736 | | |
| 4737 | + | |
4717 | 4738 | | |
4718 | 4739 | | |
4719 | 4740 | | |
| |||
4760 | 4781 | | |
4761 | 4782 | | |
4762 | 4783 | | |
4763 | | - | |
4764 | | - | |
4765 | 4784 | | |
4766 | 4785 | | |
4767 | 4786 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
937 | 946 | | |
938 | 947 | | |
939 | 948 | | |
| 949 | + | |
940 | 950 | | |
941 | 951 | | |
942 | 952 | | |
| |||
1083 | 1093 | | |
1084 | 1094 | | |
1085 | 1095 | | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1086 | 1106 | | |
1087 | 1107 | | |
1088 | 1108 | | |
| |||
1091 | 1111 | | |
1092 | 1112 | | |
1093 | 1113 | | |
| 1114 | + | |
1094 | 1115 | | |
1095 | 1116 | | |
1096 | 1117 | | |
| |||
8704 | 8725 | | |
8705 | 8726 | | |
8706 | 8727 | | |
| 8728 | + | |
8707 | 8729 | | |
8708 | 8730 | | |
8709 | 8731 | | |
| |||
8715 | 8737 | | |
8716 | 8738 | | |
8717 | 8739 | | |
8718 | | - | |
| 8740 | + | |
| 8741 | + | |
| 8742 | + | |
| 8743 | + | |
| 8744 | + | |
| 8745 | + | |
| 8746 | + | |
| 8747 | + | |
| 8748 | + | |
| 8749 | + | |
| 8750 | + | |
| 8751 | + | |
8719 | 8752 | | |
8720 | 8753 | | |
8721 | 8754 | | |
| |||
17104 | 17137 | | |
17105 | 17138 | | |
17106 | 17139 | | |
| 17140 | + | |
| 17141 | + | |
| 17142 | + | |
| 17143 | + | |
17107 | 17144 | | |
17108 | 17145 | | |
17109 | 17146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3211 | 3211 | | |
3212 | 3212 | | |
3213 | 3213 | | |
| 3214 | + | |
| 3215 | + | |
| 3216 | + | |
| 3217 | + | |
| 3218 | + | |
| 3219 | + | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + | |
| 3223 | + | |
| 3224 | + | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| |||
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
226 | | - | |
227 | | - | |
228 | 227 | | |
229 | 228 | | |
230 | 229 | | |
| |||
418 | 417 | | |
419 | 418 | | |
420 | 419 | | |
| 420 | + | |
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | 425 | | |
430 | 426 | | |
431 | 427 | | |
| |||
454 | 450 | | |
455 | 451 | | |
456 | 452 | | |
| 453 | + | |
457 | 454 | | |
458 | 455 | | |
459 | 456 | | |
| |||
463 | 460 | | |
464 | 461 | | |
465 | 462 | | |
466 | | - | |
467 | 463 | | |
468 | 464 | | |
469 | 465 | | |
| |||
0 commit comments