Commit 6e7000c
committed
Set
When generating a `channel_update` either in response to a fee
configuration change or an HTLC failure, we currently poll the
channel to check if the peer's connected when setting the disabled
bit in the `channel_update`. This could cause cases where we set
the disable bit even though the peer *just* disconnected, and don't
generate a followup broadcast `channel_update` with the disabled
bit unset.
While a node generally shouldn't rebroadcast a `channel_update` it
received in an onion, there's nothing inherently stopping them from
doing so. Obviously in the fee-update case we expect the message to
propagate.
Luckily, since we already "stage" disable-changed updates, we can
check the staged state and use that to set the disabled bit in all
`channel_update` cases.channel_update disable bit based on staged even for onions1 parent 2ebbe6f commit 6e7000c
3 files changed
Lines changed: 29 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2457 | 2457 | | |
2458 | 2458 | | |
2459 | 2459 | | |
2460 | | - | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
2461 | 2468 | | |
2462 | 2469 | | |
2463 | 2470 | | |
| |||
2582 | 2589 | | |
2583 | 2590 | | |
2584 | 2591 | | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
2585 | 2599 | | |
2586 | 2600 | | |
2587 | 2601 | | |
2588 | 2602 | | |
2589 | | - | |
| 2603 | + | |
2590 | 2604 | | |
2591 | 2605 | | |
2592 | 2606 | | |
| |||
3741 | 3755 | | |
3742 | 3756 | | |
3743 | 3757 | | |
| 3758 | + | |
3744 | 3759 | | |
3745 | 3760 | | |
3746 | 3761 | | |
3747 | 3762 | | |
3748 | 3763 | | |
3749 | 3764 | | |
3750 | | - | |
3751 | 3765 | | |
3752 | 3766 | | |
| 3767 | + | |
3753 | 3768 | | |
3754 | 3769 | | |
3755 | 3770 | | |
3756 | 3771 | | |
3757 | 3772 | | |
3758 | 3773 | | |
3759 | | - | |
3760 | 3774 | | |
3761 | 3775 | | |
3762 | 3776 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2724 | 2724 | | |
2725 | 2725 | | |
2726 | 2726 | | |
2727 | | - | |
| 2727 | + | |
2728 | 2728 | | |
2729 | 2729 | | |
2730 | | - | |
2731 | 2730 | | |
2732 | 2731 | | |
2733 | 2732 | | |
| |||
2771 | 2770 | | |
2772 | 2771 | | |
2773 | 2772 | | |
2774 | | - | |
| 2773 | + | |
2775 | 2774 | | |
2776 | 2775 | | |
2777 | | - | |
2778 | 2776 | | |
2779 | 2777 | | |
2780 | 2778 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
590 | 599 | | |
591 | 600 | | |
592 | 601 | | |
| |||
0 commit comments