Commit 52ee6f1
committed
loopin: handle unconfirmed deposits in swap selection
Unconfirmed deposits (ConfirmationHeight == 0) are considered swappable
because their CSV timeout has not started yet. Extract
blocksUntilDepositExpiry helper that returns MaxUint32 for unconfirmed
deposits and use it in SelectDeposits sorting and IsSwappable.1 parent b5c3c38 commit 52ee6f1
3 files changed
Lines changed: 40 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
879 | 880 | | |
880 | 881 | | |
881 | 882 | | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
886 | 891 | | |
887 | 892 | | |
888 | 893 | | |
| |||
914 | 919 | | |
915 | 920 | | |
916 | 921 | | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
917 | 926 | | |
918 | 927 | | |
919 | | - | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
920 | 938 | | |
921 | | - | |
922 | | - | |
923 | | - | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
924 | 942 | | |
925 | | - | |
926 | | - | |
927 | | - | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
928 | 946 | | |
929 | 947 | | |
930 | | - | |
| 948 | + | |
931 | 949 | | |
932 | 950 | | |
933 | 951 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
| |||
0 commit comments