Commit d377958
committed
Add a method to avoid re-persisting monitors during startup
Prior to LDK 0.1, in rare cases we could replay payment claims to
`ChannelMonitor`s on startup, which we then expected to be
persisted prior to normal node operation. This required
re-persisting `ChannelMonitor`s after deserializing the
`ChannelManager`, delaying startup in some cases substantially.
In 0.1 we fixed this, moving claim replays to the background to run
after the `ChannelManager` starts operating (and only
updating/persisting changes to the `ChannelMonitor`s which need
it). However, we didn't actually enable this meaningfully in our
API - nearly all users use our `ChainMonitor` and the only way to
get a chanel into `ChainMonitor` is through the normal flow which
expects to persist.
Here we add a simple method to load `ChannelMonitor`s into the
`ChainMonitor` without persisting them.1 parent ed1f304 commit d377958
File tree
5 files changed
+99
-2
lines changed- lightning/src
- chain
- ln
- util
5 files changed
+99
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
828 | 875 | | |
829 | 876 | | |
830 | 877 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1300 | 1300 | | |
1301 | 1301 | | |
1302 | 1302 | | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
1303 | 1308 | | |
1304 | 1309 | | |
1305 | 1310 | | |
| |||
1803 | 1808 | | |
1804 | 1809 | | |
1805 | 1810 | | |
| 1811 | + | |
| 1812 | + | |
1806 | 1813 | | |
1807 | 1814 | | |
1808 | 1815 | | |
| |||
1936 | 1943 | | |
1937 | 1944 | | |
1938 | 1945 | | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
1939 | 1950 | | |
1940 | 1951 | | |
1941 | 1952 | | |
| |||
6080 | 6091 | | |
6081 | 6092 | | |
6082 | 6093 | | |
| 6094 | + | |
| 6095 | + | |
| 6096 | + | |
6083 | 6097 | | |
6084 | 6098 | | |
6085 | 6099 | | |
| |||
6250 | 6264 | | |
6251 | 6265 | | |
6252 | 6266 | | |
| 6267 | + | |
| 6268 | + | |
6253 | 6269 | | |
6254 | 6270 | | |
6255 | 6271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15396 | 15396 | | |
15397 | 15397 | | |
15398 | 15398 | | |
| 15399 | + | |
15399 | 15400 | | |
15400 | 15401 | | |
15401 | 15402 | | |
| 15403 | + | |
| 15404 | + | |
| 15405 | + | |
15402 | 15406 | | |
15403 | 15407 | | |
15404 | 15408 | | |
| |||
15413 | 15417 | | |
15414 | 15418 | | |
15415 | 15419 | | |
| 15420 | + | |
15416 | 15421 | | |
15417 | 15422 | | |
15418 | 15423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1324 | 1324 | | |
1325 | 1325 | | |
1326 | 1326 | | |
1327 | | - | |
1328 | | - | |
| 1327 | + | |
| 1328 | + | |
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
518 | 547 | | |
519 | 548 | | |
520 | 549 | | |
| |||
0 commit comments