Report the sending peer in Event::OnionMessageIntercepted#4682
Conversation
|
👋 Thanks for assigning @TheBlueMatt as a reviewer! |
|
The No issues found. This is a re-review of the same commit (41ef2e6). My prior analysis holds: the field rename plus addition is clean — TLV field 0 remains the destination peer (backward/forward compatible), field 1 is the new optional |
TheBlueMatt
left a comment
There was a problem hiding this comment.
thanks. hate changing the api at this point but backporting to 0.3 probably should happen cause its trivial
|
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
When the OnionMessenger intercepts a message bound for an offline peer, it now reports which peer sent us the message to forward via a new `prev_node_id` field, so handlers can apply source-based policy when deciding whether to forward. The existing destination field is renamed `peer_node_id` -> `next_node_id` so the two node ids are unambiguous. `prev_node_id` is `None` when the forward is enqueued by a message handler (the BOLT 12 static-invoice-server flow), which isn't given the sending node; otherwise it is the node we received the message from. Co-Authored-By: Claude <noreply@anthropic.com>
e0c7e55 to
41ef2e6
Compare
When the
OnionMessengerintercepts a message bound for an offline peer, it now reports which peer sent us the message to forward via a newprev_node_idfield, so handlers can apply source-based policy when deciding whether to forward. The existing destination field is renamedpeer_node_id->next_node_idso the two node ids are unambiguous.prev_node_idisNonewhen the forward is enqueued by a message handler (the BOLT 12 static-invoice-server flow), which isn't given the sending node; otherwise it is the node we received the message from.