20
20
21
21
use sc_cli;
22
22
use sc_service:: {
23
- BasePath ,
24
- config:: { TelemetryEndpoints , PrometheusConfig } ,
25
- TransactionPoolOptions ,
23
+ config:: { PrometheusConfig , TelemetryEndpoints } ,
24
+ BasePath , TransactionPoolOptions ,
26
25
} ;
27
26
use std:: {
28
27
fs,
29
28
io:: { self , Write } ,
29
+ net:: SocketAddr ,
30
30
} ;
31
31
use structopt:: StructOpt ;
32
- use std:: net:: SocketAddr ;
33
32
34
33
/// The `purge-chain` command used to remove the whole chain: the parachain and the relaychain.
35
34
#[ derive( Debug , StructOpt ) ]
@@ -66,10 +65,12 @@ impl PurgeChainCmd {
66
65
let db_paths = databases
67
66
. iter ( )
68
67
. map ( |( chain_label, database) | {
69
- database. path ( ) . ok_or_else ( || sc_cli:: Error :: Input ( format ! (
70
- "Cannot purge custom database implementation of: {}" ,
71
- chain_label,
72
- ) ) )
68
+ database. path ( ) . ok_or_else ( || {
69
+ sc_cli:: Error :: Input ( format ! (
70
+ "Cannot purge custom database implementation of: {}" ,
71
+ chain_label,
72
+ ) )
73
+ } )
73
74
} )
74
75
. collect :: < sc_cli:: Result < Vec < _ > > > ( ) ?;
75
76
@@ -152,11 +153,11 @@ impl RunCmd {
152
153
pub fn normalize ( & self ) -> NormalizedRunCmd {
153
154
let mut new_base = self . base . clone ( ) ;
154
155
155
- new_base. validator = self . base . validator || self . collator ;
156
+ new_base. validator = self . base . validator || self . collator ;
156
157
157
- NormalizedRunCmd {
158
- base : new_base,
159
- parachain_id : self . parachain_id ,
158
+ NormalizedRunCmd {
159
+ base : new_base,
160
+ parachain_id : self . parachain_id ,
160
161
}
161
162
}
162
163
}
@@ -205,7 +206,10 @@ impl sc_cli::CliConfiguration for NormalizedRunCmd {
205
206
self . base . force_authoring ( )
206
207
}
207
208
208
- fn prometheus_config ( & self , default_listen_port : u16 ) -> sc_cli:: Result < Option < PrometheusConfig > > {
209
+ fn prometheus_config (
210
+ & self ,
211
+ default_listen_port : u16 ,
212
+ ) -> sc_cli:: Result < Option < PrometheusConfig > > {
209
213
self . base . prometheus_config ( default_listen_port)
210
214
}
211
215
@@ -217,10 +221,6 @@ impl sc_cli::CliConfiguration for NormalizedRunCmd {
217
221
self . base . rpc_ws_max_connections ( )
218
222
}
219
223
220
- fn rpc_http_threads ( & self ) -> sc_cli:: Result < Option < usize > > {
221
- self . base . rpc_http_threads ( )
222
- }
223
-
224
224
fn rpc_cors ( & self , is_dev : bool ) -> sc_cli:: Result < Option < Vec < String > > > {
225
225
self . base . rpc_cors ( is_dev)
226
226
}
0 commit comments