Commit 41ef2e6
Report the sending peer in Event::OnionMessageIntercepted
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>1 parent 0c37f08 commit 41ef2e6
3 files changed
Lines changed: 25 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1851 | 1851 | | |
1852 | 1852 | | |
1853 | 1853 | | |
1854 | | - | |
1855 | | - | |
1856 | | - | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
1857 | 1863 | | |
1858 | 1864 | | |
1859 | 1865 | | |
| |||
2435 | 2441 | | |
2436 | 2442 | | |
2437 | 2443 | | |
2438 | | - | |
| 2444 | + | |
2439 | 2445 | | |
2440 | 2446 | | |
2441 | | - | |
| 2447 | + | |
| 2448 | + | |
2442 | 2449 | | |
2443 | 2450 | | |
2444 | 2451 | | |
| |||
3068 | 3075 | | |
3069 | 3076 | | |
3070 | 3077 | | |
3071 | | - | |
| 3078 | + | |
| 3079 | + | |
3072 | 3080 | | |
3073 | 3081 | | |
3074 | 3082 | | |
3075 | | - | |
| 3083 | + | |
| 3084 | + | |
3076 | 3085 | | |
3077 | 3086 | | |
3078 | 3087 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
1147 | | - | |
1148 | | - | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
1149 | 1150 | | |
1150 | 1151 | | |
1151 | 1152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1547 | 1547 | | |
1548 | 1548 | | |
1549 | 1549 | | |
| 1550 | + | |
1550 | 1551 | | |
1551 | 1552 | | |
1552 | 1553 | | |
| |||
1662 | 1663 | | |
1663 | 1664 | | |
1664 | 1665 | | |
1665 | | - | |
| 1666 | + | |
| 1667 | + | |
1666 | 1668 | | |
1667 | 1669 | | |
1668 | 1670 | | |
| |||
1712 | 1714 | | |
1713 | 1715 | | |
1714 | 1716 | | |
1715 | | - | |
| 1717 | + | |
| 1718 | + | |
1716 | 1719 | | |
1717 | 1720 | | |
1718 | 1721 | | |
| |||
2293 | 2296 | | |
2294 | 2297 | | |
2295 | 2298 | | |
| 2299 | + | |
2296 | 2300 | | |
2297 | 2301 | | |
2298 | 2302 | | |
| |||
0 commit comments