File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 11//! Command line arguments.
22use clap:: { Parser , Subcommand } ;
33use dumbpipe:: EndpointTicket ;
4- use iroh:: { endpoint :: Connecting , Endpoint , EndpointAddr , SecretKey } ;
4+ use iroh:: { Endpoint , EndpointAddr , SecretKey , endpoint :: Connecting } ;
55use n0_snafu:: { Result , ResultExt } ;
66use std:: {
77 io,
@@ -282,16 +282,14 @@ async fn copy_from_quinn(
282282}
283283
284284/// Get the secret key or generate a new one.
285- ///
286- /// Print the secret key to stderr if it was generated, so the user can save it.
287285fn get_or_create_secret ( ) -> Result < SecretKey > {
288286 match std:: env:: var ( "IROH_SECRET" ) {
289287 Ok ( secret) => SecretKey :: from_str ( & secret) . context ( "invalid secret" ) ,
290288 Err ( _) => {
291289 let key = SecretKey :: generate ( & mut rand:: rng ( ) ) ;
292290 eprintln ! (
293- "using secret key {}" ,
294- data_encoding:: HEXLOWER . encode( & key. to_bytes ( ) )
291+ "generated new endpoint ID: {}" ,
292+ data_encoding:: HEXLOWER . encode( & * key. public ( ) )
295293 ) ;
296294 Ok ( key)
297295 }
You can’t perform that action at this time.
0 commit comments