Commit c453d04
committed
Ensure ChannelManager methods are idempotent
During event handling, ChannelManager methods may need to be called as
indicated in the Event documentation. Ensure that these calls are
idempotent for the same event rather than panicking. This allows users
to persist events for later handling without needing to worry about
processing the same event twice (e.g., if ChannelManager is not
persisted but the events were, the restarted ChannelManager would return
some of the same events).1 parent a3e4af0 commit c453d04
File tree
3 files changed
+42
-10
lines changed- lightning/src
- ln
- util
3 files changed
+42
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2443 | 2443 | | |
2444 | 2444 | | |
2445 | 2445 | | |
2446 | | - | |
| 2446 | + | |
| 2447 | + | |
2447 | 2448 | | |
2448 | 2449 | | |
2449 | 2450 | | |
| |||
2458 | 2459 | | |
2459 | 2460 | | |
2460 | 2461 | | |
| 2462 | + | |
2461 | 2463 | | |
2462 | 2464 | | |
2463 | 2465 | | |
| |||
3353 | 3355 | | |
3354 | 3356 | | |
3355 | 3357 | | |
3356 | | - | |
3357 | | - | |
3358 | | - | |
| 3358 | + | |
| 3359 | + | |
3359 | 3360 | | |
3360 | 3361 | | |
3361 | 3362 | | |
3362 | 3363 | | |
3363 | 3364 | | |
3364 | 3365 | | |
3365 | | - | |
| 3366 | + | |
| 3367 | + | |
3366 | 3368 | | |
| 3369 | + | |
3367 | 3370 | | |
3368 | 3371 | | |
| 3372 | + | |
3369 | 3373 | | |
3370 | 3374 | | |
3371 | 3375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
561 | 566 | | |
562 | 567 | | |
563 | 568 | | |
| |||
1057 | 1062 | | |
1058 | 1063 | | |
1059 | 1064 | | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
1060 | 1068 | | |
1061 | 1069 | | |
1062 | 1070 | | |
| |||
1070 | 1078 | | |
1071 | 1079 | | |
1072 | 1080 | | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
1073 | 1084 | | |
1074 | 1085 | | |
1075 | 1086 | | |
| |||
1392 | 1403 | | |
1393 | 1404 | | |
1394 | 1405 | | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
1395 | 1412 | | |
1396 | 1413 | | |
1397 | 1414 | | |
| |||
1536 | 1553 | | |
1537 | 1554 | | |
1538 | 1555 | | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
1539 | 1562 | | |
1540 | 1563 | | |
1541 | 1564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
| 156 | + | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
| |||
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
274 | | - | |
275 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
276 | 281 | | |
277 | 282 | | |
278 | 283 | | |
| |||
0 commit comments