]> git.bitcoin.ninja Git - rust-lightning/commit
Add node id to remaining `RoutingMessageHandler::handle_` methods
authorElias Rohrer <dev@tnull.de>
Wed, 4 Sep 2024 13:39:20 +0000 (15:39 +0200)
committerElias Rohrer <dev@tnull.de>
Wed, 11 Sep 2024 16:01:33 +0000 (18:01 +0200)
commitf68b8b68346e066bae9b22e53c7b72491d1c22c6
treea6e0bdc87bf66ae474be2b31cf9af26394714341
parent82b3f620f587abb9561482f9d332218d8ba528f3
Add node id to remaining `RoutingMessageHandler::handle_` methods

Previously, some `RoutingMessageHandler::handle_` methods (in particular
the ones handling node and channel announcements, as well as channel
updates, omitted the `their_node_id` argument. This didn't allow
implementors to discern *who* sent a particular method.

Here, we add `their_node_id: Option<&PublicKey>` to have them learn who
sent a message, and set `None` if our own node it the originator of a
broadcast operation.
12 files changed:
lightning-net-tokio/src/lib.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/msgs.rs
lightning/src/ln/offers_tests.rs
lightning/src/ln/peer_handler.rs
lightning/src/ln/priv_short_conf_tests.rs
lightning/src/ln/reload_tests.rs
lightning/src/routing/gossip.rs
lightning/src/routing/test_utils.rs
lightning/src/util/test_utils.rs