Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node id to remaining RoutingMessageHandler::handle_ methods #3291

Commits on Sep 11, 2024

  1. 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.
    tnull committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    f68b8b6 View commit details
    Browse the repository at this point in the history
  2. Refactor: Take their_node_id by value across all handler interfaces

    In order to maintain interface consistency, we refactor all message
    handler interfaces to take `PublicKey` rather than `&PublicKey`, as the
    difference in efficiency should be negigible and the former is easier to
    handle in binding languages.
    
    Over time, we also want to move (no pun intended) towards all messaging
    interfaces using move semantics, so dropping the reference for
    `PublicKey` is the first step in this direction.
    tnull committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    b172942 View commit details
    Browse the repository at this point in the history