@@ -26,13 +26,13 @@ pub fn init(args: InitArgs) -> Result<(), ExitCode> {
26
26
}
27
27
28
28
if args. chain != "dev" && !args. customize_spec . is_unset ( ) {
29
- eprintln ! ( "Customizing consensus parameters for chain spec only works for dev chains." ) ;
29
+ eprintln ! ( "Customizing consensus parameters for chain spec; only works for dev chains." ) ;
30
30
return Err ( ExitCode :: Failure ) ;
31
31
}
32
32
33
33
let exported = Resource :: exported_in ( & args. root_dir ) ;
34
34
if !args. force && exported {
35
- eprintln ! ( "Config files already exist, use --force to overwrite." ) ;
35
+ eprintln ! ( "Config files already exist; use --force to overwrite." ) ;
36
36
37
37
if args. interactive {
38
38
let input = prompt ( "Overwrite config files now? " ) ;
@@ -103,15 +103,15 @@ pub fn init(args: InitArgs) -> Result<(), ExitCode> {
103
103
) ;
104
104
} else if * default_code_hash != * hash {
105
105
eprintln ! (
106
- "WARN: the default secp256k1 code hash is `{default_code_hash}`, you are using `{hash}`.\n \
107
- It will require `ckb run --ba-advanced` to enable this block assembler "
106
+ "WARN: Use the default secp256k1 code hash `{default_code_hash}` rather than `{hash}`.\n \
107
+ To enable this block assembler, use `ckb run --ba-advanced`. "
108
108
) ;
109
109
} else if args. block_assembler_args . len ( ) != 1
110
110
|| args. block_assembler_args [ 0 ] . len ( ) != SECP256K1_BLAKE160_SIGHASH_ALL_ARG_LEN
111
111
{
112
112
eprintln ! (
113
- "WARN: the block assembler arg is not a valid secp256k1 pubkey hash.\n \
114
- It will require `ckb run --ba-advanced` to enable this block assembler "
113
+ "WARN: The block assembler arg is not a valid secp256k1 pubkey hash.\n \
114
+ To enable this block assembler, use `ckb run --ba-advanced`. "
115
115
) ;
116
116
}
117
117
}
@@ -129,7 +129,7 @@ pub fn init(args: InitArgs) -> Result<(), ExitCode> {
129
129
)
130
130
}
131
131
None => {
132
- eprintln ! ( "WARN: mining feature is disabled because of lacking the block assembler config options" ) ;
132
+ eprintln ! ( "WARN: Mining feature is disabled because of the lack of the block assembler config options. " ) ;
133
133
format ! (
134
134
"# secp256k1_blake160_sighash_all example:\n \
135
135
# [block_assembler]\n \
@@ -175,7 +175,7 @@ pub fn init(args: InitArgs) -> Result<(), ExitCode> {
175
175
let target_file = specs_dir. join ( format ! ( "{}.toml" , args. chain) ) ;
176
176
177
177
if spec_file == "-" {
178
- println ! ( "create specs/{}.toml from stdin" , args. chain) ;
178
+ println ! ( "Create specs/{}.toml from stdin" , args. chain) ;
179
179
let mut encoded_content = String :: new ( ) ;
180
180
io:: stdin ( ) . read_to_string ( & mut encoded_content) ?;
181
181
let base64_config =
@@ -185,30 +185,32 @@ pub fn init(args: InitArgs) -> Result<(), ExitCode> {
185
185
let spec_content = base64_engine. encode ( encoded_content. trim ( ) ) ;
186
186
fs:: write ( target_file, spec_content) ?;
187
187
} else {
188
- println ! ( "cp {} specs/{}.toml" , spec_file, args. chain) ;
188
+ println ! ( "copy {} to specs/{}.toml" , spec_file, args. chain) ;
189
189
fs:: copy ( spec_file, target_file) ?;
190
190
}
191
191
} else if args. chain == "dev" {
192
- println ! ( "create {SPEC_DEV_FILE_NAME}" ) ;
192
+ println ! ( "Create {SPEC_DEV_FILE_NAME}" ) ;
193
193
let bundled = Resource :: bundled ( SPEC_DEV_FILE_NAME . to_string ( ) ) ;
194
194
let kvs = args. customize_spec . key_value_pairs ( ) ;
195
195
let context_spec =
196
196
TemplateContext :: new ( "customize" , kvs. iter ( ) . map ( |( k, v) | ( * k, v. as_str ( ) ) ) ) ;
197
197
bundled. export ( & context_spec, & args. root_dir ) ?;
198
198
}
199
199
200
- println ! ( "create {CKB_CONFIG_FILE_NAME}" ) ;
200
+ println ! ( "Create {CKB_CONFIG_FILE_NAME}" ) ;
201
201
Resource :: bundled_ckb_config ( ) . export ( & context, & args. root_dir ) ?;
202
- println ! ( "create {MINER_CONFIG_FILE_NAME}" ) ;
202
+ println ! ( "Create {MINER_CONFIG_FILE_NAME}" ) ;
203
203
Resource :: bundled_miner_config ( ) . export ( & context, & args. root_dir ) ?;
204
- println ! ( "create {DB_OPTIONS_FILE_NAME}" ) ;
204
+ println ! ( "Create {DB_OPTIONS_FILE_NAME}" ) ;
205
205
Resource :: bundled_db_options ( ) . export ( & context, & args. root_dir ) ?;
206
206
207
207
let genesis_hash = AppConfig :: load_for_subcommand ( args. root_dir , cli:: CMD_INIT ) ?
208
208
. chain_spec ( ) ?
209
209
. build_genesis ( )
210
210
. map_err ( |err| {
211
- eprintln ! ( "couldn't build genesis from generated chain spec, since {err}" ) ;
211
+ eprintln ! (
212
+ "Couldn't build the genesis block from the generated chain spec, since {err}"
213
+ ) ;
212
214
ExitCode :: Failure
213
215
} ) ?
214
216
. hash ( ) ;
0 commit comments