Commit 3059b37
committed
Decouple LSPS4 webhooks from liquidity loop
Send LSPS4 wake-up webhooks in the background instead of awaiting the
HTTP response on the liquidity event loop.
Direct webhook delivery was meant to reduce wake-up latency, but waiting
for the response made unrelated liquidity work depend on the client's
webhook handler. When that handler keeps the request open while the
node wakes and starts processing payments, follow-up actions such as
opening a channel can be delayed behind the webhook.
Keep a long timeout on the background request as cleanup for genuinely
stuck connections. The timeout is not part of LSPS4 control flow; it is
there to bound resource usage while still treating the webhook as
best-effort.1 parent ac65798 commit 3059b37
1 file changed
Lines changed: 28 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
1332 | 1336 | | |
1333 | 1337 | | |
1334 | 1338 | | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
1335 | 1343 | | |
1336 | 1344 | | |
1337 | 1345 | | |
1338 | 1346 | | |
1339 | 1347 | | |
1340 | 1348 | | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
1344 | 1369 | | |
1345 | 1370 | | |
1346 | 1371 | | |
| |||
0 commit comments