Commit 21f829b
committed
Do not fail to load
When we begin claiming a payment, we move the tracking of it from
`claimable_payments` to `claiming_payments`. This ensures we only
ever have one payment which is in the process of being claimed with
a given payment hash at a time and lets us keep track of when all
parts have been claimed with their `ChannelMonitor`s.
However, on startup, we check that failing to move a payment from
`claimable_payments` to `claiming_payments` implies that it is not
present in `claiming_payments`. This is fine if the payment doesn't
exist, but if the payment has already started being claimed, this
will fail and we'll refuse to deserialize the `ChannelManager`
(with a `debug_assert` failure in debug mode).
Here we resolve this by checking if a payment is already being
claimed before we attempt to initiate claiming and skip the failing
check in that case.ChannelManager when we see claiming payments1 parent 78fee88 commit 21f829b
2 files changed
+32
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14835 | 14835 | | |
14836 | 14836 | | |
14837 | 14837 | | |
| 14838 | + | |
| 14839 | + | |
| 14840 | + | |
| 14841 | + | |
| 14842 | + | |
| 14843 | + | |
| 14844 | + | |
| 14845 | + | |
| 14846 | + | |
| 14847 | + | |
| 14848 | + | |
| 14849 | + | |
| 14850 | + | |
| 14851 | + | |
| 14852 | + | |
| 14853 | + | |
14838 | 14854 | | |
14839 | 14855 | | |
14840 | 14856 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
| 786 | + | |
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
| |||
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
802 | | - | |
803 | | - | |
| 802 | + | |
| 803 | + | |
804 | 804 | | |
805 | 805 | | |
806 | | - | |
| 806 | + | |
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
| |||
878 | 878 | | |
879 | 879 | | |
880 | 880 | | |
881 | | - | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
882 | 889 | | |
883 | 890 | | |
884 | 891 | | |
| |||
973 | 980 | | |
974 | 981 | | |
975 | 982 | | |
976 | | - | |
977 | | - | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
978 | 987 | | |
979 | 988 | | |
980 | 989 | | |
| |||
0 commit comments