Commit e27dee0
committed
connectd: fix nagle disabling logic.
Our CORK logic was wrong, and it's better to use Nagle anyway:
we disable Nagle just before sending timing-critical messages.
Time for 100 (failed) payments:
Before:
148.8573575
After:
10.7356977
Note this revealed a timing problem in test_reject_invalid_payload: we would
miss the cause of the sendonion failure, and waitsendpay would be called
*after* it had failed, so simply returns "Payment failure reason unknown".
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Fixed: Protocol: Removed 200ms latency from sending commit/revoke messages.1 parent 863aac4 commit e27dee0
3 files changed
+5
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
311 | | - | |
312 | 310 | | |
313 | 311 | | |
314 | 312 | | |
| |||
318 | 316 | | |
319 | 317 | | |
320 | 318 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | 319 | | |
332 | 320 | | |
333 | | - | |
| 321 | + | |
334 | 322 | | |
335 | 323 | | |
336 | | - | |
337 | | - | |
| 324 | + | |
| 325 | + | |
338 | 326 | | |
339 | 327 | | |
340 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4822 | 4822 | | |
4823 | 4823 | | |
4824 | 4824 | | |
4825 | | - | |
4826 | 4825 | | |
4827 | 4826 | | |
4828 | 4827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3423 | 3423 | | |
3424 | 3424 | | |
3425 | 3425 | | |
3426 | | - | |
3427 | | - | |
3428 | | - | |
3429 | 3426 | | |
3430 | 3427 | | |
3431 | 3428 | | |
| 3429 | + | |
| 3430 | + | |
3432 | 3431 | | |
3433 | 3432 | | |
3434 | 3433 | | |
| |||
0 commit comments