@@ -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
@@ -102,7 +102,7 @@ impl wire::CustomMessageReader for IgnoringMessageHandler {
102
102
}
103
103
104
104
impl CustomMessageHandler for IgnoringMessageHandler {
105
- fn handle_custom_message ( & self , _msg : Self :: CustomMessage ) -> Result < ( ) , LightningError > {
105
+ fn handle_custom_message ( & self , _msg : Self :: CustomMessage , _sender_node_id : & PublicKey ) -> Result < ( ) , LightningError > {
106
106
// Since we always return `None` in the read the handle method should never be called.
107
107
unreachable ! ( ) ;
108
108
}
@@ -1087,7 +1087,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
1087
1087
log_trace ! ( self . logger, "Received unknown odd message of type {}, ignoring" , type_id) ;
1088
1088
} ,
1089
1089
wire:: Message :: Custom ( custom) => {
1090
- self . custom_message_handler . handle_custom_message ( custom) ?;
1090
+ self . custom_message_handler . handle_custom_message ( custom, & peer . their_node_id . unwrap ( ) ) ?;
1091
1091
} ,
1092
1092
} ;
1093
1093
Ok ( should_forward)
0 commit comments