Commit 946bc8b
committed
Allow stale
In 601bf4b we started refusing to
load `ChannelMonitor`s which were created prior to LDK 0.0.110 and
which were last updated prior to LDK 0.0.116. While this is likely
fine for nearly all of our users, there's some risk that some (like
me) have ancient un-archived `ChannelMonitor`s.
We do need to start auto-archiving `ChannelMonitor`s but for now we
need some way for such users to at least not fail on startup.
Sadly, ancient `ChannelMonitor`s often don't contain some of the
data we need to accurately calculate `Balance`s, but in cases where
they do, and where there are no claimable `Balance`s, we can be
confident we don't need the `ChannelMonitor`s.
Thus, here, we adapt the `ChannelMonitor` `Readable` implementation
used in the persistence wrappers to detect this case and simply
skip loading such `ChannelMonitor`s. Its not clear if this is
sufficient, but its at least better than the current state of
affairs after 601bf4b.ChannelMonitors if we are sure they don't have funds1 parent 2efb009 commit 946bc8b
2 files changed
+85
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1067 | 1074 | | |
1068 | 1075 | | |
1069 | 1076 | | |
| |||
6251 | 6258 | | |
6252 | 6259 | | |
6253 | 6260 | | |
| 6261 | + | |
| 6262 | + | |
| 6263 | + | |
| 6264 | + | |
| 6265 | + | |
| 6266 | + | |
| 6267 | + | |
| 6268 | + | |
| 6269 | + | |
| 6270 | + | |
| 6271 | + | |
| 6272 | + | |
6254 | 6273 | | |
6255 | 6274 | | |
6256 | 6275 | | |
| |||
6528 | 6547 | | |
6529 | 6548 | | |
6530 | 6549 | | |
6531 | | - | |
6532 | | - | |
6533 | | - | |
6534 | | - | |
6535 | | - | |
6536 | 6550 | | |
6537 | 6551 | | |
6538 | 6552 | | |
| |||
6586 | 6600 | | |
6587 | 6601 | | |
6588 | 6602 | | |
6589 | | - | |
| 6603 | + | |
| 6604 | + | |
6590 | 6605 | | |
6591 | 6606 | | |
6592 | 6607 | | |
| |||
6646 | 6661 | | |
6647 | 6662 | | |
6648 | 6663 | | |
6649 | | - | |
| 6664 | + | |
6650 | 6665 | | |
6651 | 6666 | | |
6652 | 6667 | | |
| |||
6658 | 6673 | | |
6659 | 6674 | | |
6660 | 6675 | | |
6661 | | - | |
| 6676 | + | |
| 6677 | + | |
| 6678 | + | |
| 6679 | + | |
| 6680 | + | |
| 6681 | + | |
| 6682 | + | |
| 6683 | + | |
| 6684 | + | |
| 6685 | + | |
| 6686 | + | |
| 6687 | + | |
| 6688 | + | |
| 6689 | + | |
6662 | 6690 | | |
6663 | 6691 | | |
6664 | 6692 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
394 | 395 | | |
395 | 396 | | |
396 | 397 | | |
| |||
783 | 784 | | |
784 | 785 | | |
785 | 786 | | |
786 | | - | |
787 | 787 | | |
788 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
789 | 792 | | |
790 | 793 | | |
791 | 794 | | |
| |||
922 | 925 | | |
923 | 926 | | |
924 | 927 | | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
925 | 945 | | |
926 | 946 | | |
927 | | - | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
928 | 952 | | |
929 | 953 | | |
930 | 954 | | |
| |||
955 | 979 | | |
956 | 980 | | |
957 | 981 | | |
958 | | - | |
| 982 | + | |
959 | 983 | | |
960 | 984 | | |
961 | 985 | | |
962 | | - | |
| 986 | + | |
963 | 987 | | |
964 | | - | |
| 988 | + | |
965 | 989 | | |
966 | 990 | | |
967 | 991 | | |
| |||
971 | 995 | | |
972 | 996 | | |
973 | 997 | | |
974 | | - | |
| 998 | + | |
975 | 999 | | |
976 | 1000 | | |
977 | 1001 | | |
978 | | - | |
| 1002 | + | |
| 1003 | + | |
979 | 1004 | | |
980 | 1005 | | |
981 | 1006 | | |
| |||
987 | 1012 | | |
988 | 1013 | | |
989 | 1014 | | |
990 | | - | |
| 1015 | + | |
991 | 1016 | | |
992 | 1017 | | |
993 | 1018 | | |
| |||
1027 | 1052 | | |
1028 | 1053 | | |
1029 | 1054 | | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1033 | 1063 | | |
1034 | 1064 | | |
1035 | 1065 | | |
| |||
0 commit comments