]> git.bitcoin.ninja Git - rust-lightning/commit
Remove the `peer_disconnected` `no_connection_possible` flag 2023-02-fix-no-con-discon
authorMatt Corallo <git@bluematt.me>
Tue, 21 Feb 2023 19:10:43 +0000 (19:10 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 21 Feb 2023 19:17:06 +0000 (19:17 +0000)
commitbe6f263825e0c75d32d6d48fd5dff9986ca6b011
treee18cb19b2055cc236a6d5a5dc8150ac22cdb05fb
parent0f07d5c0b0b594690c77eb7d526a7afa38329b03
Remove the `peer_disconnected` `no_connection_possible` flag

Long ago, we used the `no_connection_possible` to signal that a
peer has some unknown feature set or some other condition prevents
us from ever connecting to the given peer. In that case we'd
automatically force-close all channels with the given peer. This
was somewhat surprising to users so we removed the automatic
force-close, leaving the flag serving no LDK-internal purpose.

Distilling the concept of "can we connect to this peer again in the
future" to a simple flag turns out to be ripe with edge cases, so
users actually using the flag to force-close channels would likely
cause surprising behavior.

Thus, there's really not a lot of reason to keep the flag,
especially given its untested and likely to be broken in subtle
ways anyway.
15 files changed:
fuzz/src/chanmon_consistency.rs
lightning-invoice/src/utils.rs
lightning-net-tokio/src/lib.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/msgs.rs
lightning/src/ln/onion_route_tests.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/peer_handler.rs
lightning/src/ln/priv_short_conf_tests.rs
lightning/src/ln/reload_tests.rs
lightning/src/ln/shutdown_tests.rs
lightning/src/onion_message/messenger.rs
lightning/src/util/test_utils.rs