]> git.bitcoin.ninja Git - rust-lightning/commit
Move `broadcast_node_announcement` to `PeerManager`
authorMatt Corallo <git@bluematt.me>
Tue, 6 Sep 2022 22:34:29 +0000 (22:34 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 8 Sep 2022 19:50:36 +0000 (19:50 +0000)
commit989cb064b5279da3c9e0f3a121637d8bbed81bfb
tree77a0f5626d12fc6dd08b97450eba8ed978576e1a
parent6b0afbe4d46e2bf71ce8c54a05ab1beb7d38e36d
Move `broadcast_node_announcement` to `PeerManager`

Some `NodeFeatures` will, in the future, represent features which
are not enabled by the `ChannelManager`, but by other message
handlers handlers. Thus, it doesn't make sense to determine the
node feature bits in the `ChannelManager`.

The simplest fix for this is to change to generating the
node_announcement in `PeerManager`, asking all the connected
handlers which feature bits they support and simply OR'ing them
together. While this may not be sufficient in the future as it
doesn't consider feature bit dependencies, support for those could
be handled at the feature level in the future.

This commit moves the `broadcast_node_announcement` function to
`PeerHandler` but does not yet implement feature OR'ing.
fuzz/src/full_stack.rs
lightning-background-processor/src/lib.rs
lightning-net-tokio/src/lib.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/msgs.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/peer_handler.rs
lightning/src/util/events.rs
lightning/src/util/test_utils.rs