Commit f427158
committed
feat(swapclient): heartbeat
This commit shortens the interval for the outbound capacity check timer
from 60 to 3 seconds and sets the client as disconnected any time a
call fails due to an unreachable server. This makes the capacity checks
act like a heartbeat, checking that the server is reachable every few
seconds even in the absence of any other activity.
Previously, we had used a dummy server -> client streaming call and
listened for the `error` event on the lnd side, however with newer
versions of lnd and grpc this is no longer a reliable way to tell when
lnd has gone down.
This also resolves an issue where lnd would get stuck in the
`WaitingUnlock` state if it is stopped while xud is running and comes
back online in the locked state.
Closes #1090.1 parent e1ee78a commit f427158
File tree
3 files changed
+16
-31
lines changed- lib
- lndclient
- raidenclient
- swaps
3 files changed
+16
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
163 | 162 | | |
164 | 163 | | |
165 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
| |||
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
190 | 197 | | |
191 | 198 | | |
192 | 199 | | |
| |||
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
| 213 | + | |
206 | 214 | | |
207 | 215 | | |
208 | 216 | | |
| |||
236 | 244 | | |
237 | 245 | | |
238 | 246 | | |
239 | | - | |
| 247 | + | |
240 | 248 | | |
241 | 249 | | |
242 | 250 | | |
| |||
375 | 383 | | |
376 | 384 | | |
377 | 385 | | |
378 | | - | |
379 | | - | |
380 | 386 | | |
381 | 387 | | |
382 | 388 | | |
| |||
800 | 806 | | |
801 | 807 | | |
802 | 808 | | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | 809 | | |
823 | 810 | | |
824 | 811 | | |
| |||
850 | 837 | | |
851 | 838 | | |
852 | 839 | | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | 840 | | |
858 | 841 | | |
859 | 842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
| |||
391 | 390 | | |
392 | 391 | | |
393 | 392 | | |
394 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
395 | 397 | | |
396 | 398 | | |
397 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments