rust-lightning/lightning/src/ln
Matt Corallo 6e7000c5e7 Set channel_update disable bit based on staged even for onions
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.
2023-04-18 04:20:10 +00:00
..
chan_utils.rs Merge pull request #2101 from TheBlueMatt/2023-03-one-less-sig 2023-04-06 18:07:55 +00:00
chanmon_update_fail_tests.rs Merge pull request #2148 from TheBlueMatt/2023-04-claim-from-closed 2023-04-07 16:17:25 +00:00
channel.rs Replace OUR_MAX_HTLCS constant with config knob 2023-04-16 19:28:49 -04:00
channelmanager.rs Set channel_update disable bit based on staged even for onions 2023-04-18 04:20:10 +00:00
features.rs Replacing (C-not exported) in the docs 2023-03-22 14:30:36 +03:00
functional_test_utils.rs Set channel_update disable bit based on staged even for onions 2023-04-18 04:20:10 +00:00
functional_tests.rs Merge pull request #2138 from swilliamson5/replace-our-max-htlcs-constant 2023-04-17 21:58:07 +00:00
inbound_payment.rs Add new payment type and metadata bytes 2023-01-24 21:01:27 +02:00
mod.rs Replacing (C-not exported) in the docs 2023-03-22 14:30:36 +03:00
monitor_tests.rs Replace PaymentSecret with RecipientOnionFields in the pub API 2023-04-05 16:28:14 +00:00
msgs.rs Use NodeAlias type in NodeAnnouncement 2023-04-13 13:09:03 -05:00
onion_route_tests.rs Set channel_update disable bit based on staged even for onions 2023-04-18 04:20:10 +00:00
onion_utils.rs Pipe the new RecipientOnionFields through send pipeline 2023-04-05 16:28:14 +00:00
outbound_payment.rs Add reason to Event::PaymentFailed 2023-04-10 17:13:47 -05:00
payment_tests.rs Add reason to Event::PaymentFailed 2023-04-10 17:13:47 -05:00
peer_channel_encryptor.rs Use NodeSigner::ecdh to compute SharedSecrets 2023-01-18 17:23:23 -08:00
peer_handler.rs Use NodeAlias type in NodeAnnouncement 2023-04-13 13:09:03 -05:00
priv_short_conf_tests.rs Replace PaymentSecret with RecipientOnionFields in the pub API 2023-04-05 16:28:14 +00:00
reload_tests.rs Replace PaymentSecret with RecipientOnionFields in the pub API 2023-04-05 16:28:14 +00:00
reorg_tests.rs Merge pull request #2059 from wpaulino/broadcast-missing-anchors-event 2023-03-29 21:54:58 +00:00
script.rs Use UserConfig to determine advertised InitFeatures by ChannelManager 2023-01-13 23:54:51 -08:00
shutdown_tests.rs Replace PaymentSecret with RecipientOnionFields in the pub API 2023-04-05 16:28:14 +00:00
wire.rs Docs improvements 2023-03-21 14:11:13 +00:00