@@ -70,12 +70,12 @@ async fn process_requests(
7070 if let Ok ( msg) = conn. read ( ) . await {
7171 match msg. msgtype ( ) {
7272 9 => {
73- debug ! ( "Got a message from node: {:?}" , & msg. body) ;
73+ eprintln ! ( "Got a message from node: {:?}" , & msg. body) ;
7474 // This requests a new client fd with a given context,
7575 // handle it locally, and defer the creation of the client
7676 // fd on the server side until we need it.
7777 let ctx = HsmRequestContext :: from_client_hsmfd_msg ( & msg) ?;
78- debug ! ( "Got a request for a new client fd. Context: {:?}" , ctx) ;
78+ eprintln ! ( "Got a request for a new client fd. Context: {:?}" , ctx) ;
7979
8080 let ( local, remote) = UnixStream :: pair ( ) ?;
8181 let local = NodeConnection {
@@ -103,15 +103,20 @@ async fn process_requests(
103103 signer_state : Vec :: new ( ) ,
104104 } ) ;
105105 let start_time = tokio:: time:: Instant :: now ( ) ;
106- debug ! ( "Got a message from node: {:?}" , & req) ;
106+ eprintln ! (
107+ "WIRE: lightningd -> hsmd: Got a message from node: {:?}" ,
108+ & req
109+ ) ;
110+ eprintln ! ( "WIRE: hsmd -> plugin: Forwarding: {:?}" , & req) ;
107111 let res = server. request ( req) . await ?. into_inner ( ) ;
108112 let msg = Message :: from_raw ( res. raw ) ;
109113 let delta = start_time. elapsed ( ) ;
110- debug ! (
111- "Got respone from hsmd: {:?} after {}ms" ,
114+ eprintln ! (
115+ "WIRE: plugin -> hsmd: Got respone from hsmd: {:?} after {}ms" ,
112116 & msg,
113117 delta. as_millis( )
114118 ) ;
119+ eprintln ! ( "WIRE: hsmd -> lightningd: {:?}" , & msg) ;
115120 conn. write ( msg) . await ?
116121 }
117122 }
0 commit comments