44
55use nix:: {
66 sys:: socket:: {
7- self , setsockopt , socket , sockopt , AddressFamily , SockFlag , SockType ,
8- SockaddrIn ,
7+ self , AddressFamily , SockFlag , SockType , SockaddrIn , setsockopt , socket ,
8+ sockopt ,
99 } ,
1010 unistd:: { self , ForkResult } ,
1111} ;
@@ -20,15 +20,15 @@ use std::{
2020 io:: { ErrorKind , Write } ,
2121 os:: unix:: io:: AsRawFd ,
2222 path:: PathBuf ,
23- process:: { exit , Command , Stdio } ,
23+ process:: { Command , Stdio , exit } ,
2424 str:: FromStr ,
2525 sync:: LazyLock ,
2626} ;
27- use tendermint:: { validator:: Info as TmValidator , vote:: Power as TmPower , Genesis } ;
27+ use tendermint:: { Genesis , validator:: Info as TmValidator , vote:: Power as TmPower } ;
2828use tendermint_config:: {
2929 PrivValidatorKey as TmValidatorKey , TendermintConfig as TmConfig ,
3030} ;
31- use toml_edit:: { value as toml_value , Array , DocumentMut as Document } ;
31+ use toml_edit:: { Array , DocumentMut as Document , value as toml_value } ;
3232
3333pub use super :: common:: * ;
3434use crate :: common:: NodeCmdGenerator ;
@@ -674,7 +674,7 @@ where
674674 let tmp_id = NodeID :: MAX ;
675675 let tmp_home = format ! ( "{}/{}" , & self . meta. home, tmp_id) ;
676676
677- let gen = |genesis_file : String | {
677+ let genit = |genesis_file : String | {
678678 self . meta
679679 . nodes
680680 . values ( )
@@ -735,7 +735,7 @@ where
735735 . map_err ( |e| eg ! ( e) )
736736 } )
737737 . and_then ( |cfg| cfg. genesis_file . to_str ( ) . map ( |f| f. to_owned ( ) ) . c ( d ! ( ) ) )
738- . and_then ( gen )
738+ . and_then ( genit )
739739 . and_then ( |_| fs:: remove_dir_all ( tmp_home) . c ( d ! ( ) ) )
740740 }
741741
@@ -859,8 +859,7 @@ impl<P: NodePorts> Node<P> {
859859 } else {
860860 println ! (
861861 "This node(ID {}) may be in a partial failed state, less than 3 live processes({}) detected, enter the restart process." ,
862- self . id,
863- process_cnt
862+ self . id, process_cnt
864863 ) ;
865864 // Probably a partial failure
866865 self . stop ( env, false ) . c ( d ! ( ) ) ?;
0 commit comments