@@ -47,7 +47,7 @@ use bitcoin::hashes::{HashEngine, Hash};
47
47
pub trait CustomMessageHandler : wire:: CustomMessageReader {
48
48
/// Called with the message type that was received and the buffer to be read.
49
49
/// Can return a `MessageHandlingError` if the message could not be handled.
50
- fn handle_custom_message ( & self , msg : Self :: CustomMessage ) -> Result < ( ) , LightningError > ;
50
+ fn handle_custom_message ( & self , msg : Self :: CustomMessage , sender_node_id : & PublicKey ) -> Result < ( ) , LightningError > ;
51
51
52
52
/// Gets the list of pending messages which were generated by the custom message
53
53
/// handler, clearing the list in the process. The first tuple element must
@@ -101,7 +101,7 @@ impl wire::CustomMessageReader for IgnoringMessageHandler {
101
101
}
102
102
103
103
impl CustomMessageHandler for IgnoringMessageHandler {
104
- fn handle_custom_message ( & self , _msg : Self :: CustomMessage ) -> Result < ( ) , LightningError > {
104
+ fn handle_custom_message ( & self , _msg : Self :: CustomMessage , _sender_node_id : & PublicKey ) -> Result < ( ) , LightningError > {
105
105
// Since we always return `None` in the read the handle method should never be called.
106
106
unreachable ! ( ) ;
107
107
}
@@ -1086,7 +1086,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
1086
1086
log_trace ! ( self . logger, "Received unknown odd message of type {}, ignoring" , type_id) ;
1087
1087
} ,
1088
1088
wire:: Message :: Custom ( custom) => {
1089
- self . custom_message_handler . handle_custom_message ( custom) ?;
1089
+ self . custom_message_handler . handle_custom_message ( custom, & peer . their_node_id . unwrap ( ) ) ?;
1090
1090
} ,
1091
1091
} ;
1092
1092
Ok ( should_forward)
0 commit comments