diff --git a/docs/Plugin.md b/docs/Plugin.md index 63e9fe70..c9234330 100644 --- a/docs/Plugin.md +++ b/docs/Plugin.md @@ -19,7 +19,7 @@ The `key_store` and `indexer` role plugin can replace the default implementation The `sub_command` role plugin will add a top level sub-command in ckb-cli, the plugin will need to parse the command line argument itself. -The `callback` role plugin will be called when certain event happend (send transaction for example). +The `callback` role plugin will be called when certain event happened (send transaction for example). Here is the config return as the response of `get_config` method. @@ -39,7 +39,7 @@ A plugin can define as `daemon` pluign, ckb-cli will start all actived `daemon` The plugin can access rpc request by `rpc_` prefixed methods, they are just proxies of [CKB json-rpc](https://github.com/nervosnetwork/ckb/blob/develop/rpc/README.md) calls. It is useful when implement your own indexer. # RPC protocol -The rpc is follow jsonrpc 2.0 protocol. For rust user, `plugin-protocl` package provide a more semantic interface. +The rpc is follow jsonrpc 2.0 protocol. For rust user, `plugin-protocol` package provide a more semantic interface. ## Get config of the plugin @@ -468,7 +468,7 @@ If you want see all the debug log messages from plugin module, you can start ckb RUST_LOG=ckb_cli::plugin=debug ./target/debug/ckb-cli ``` -Show the detail infromation of the plugin: +Show the detail information of the plugin: ``` shell CKB> plugin info --name demo_keystore daemon: true diff --git a/src/plugin/manager.rs b/src/plugin/manager.rs index 6126ab38..5b71f1dc 100644 --- a/src/plugin/manager.rs +++ b/src/plugin/manager.rs @@ -963,7 +963,7 @@ impl PluginProcess { Err(err) => Err(err.to_string()) } } - // Send repsonse requested by plugin to ckb-cli (ServiceProvider) + // Send response requested by plugin to ckb-cli (ServiceProvider) recv(service_receiver) -> msg_result => { match msg_result { Ok(msg) => handle_service_msgs(&mut stdin, msg), diff --git a/src/subcommands/tui/mod.rs b/src/subcommands/tui/mod.rs index 90e109fa..b05963ec 100644 --- a/src/subcommands/tui/mod.rs +++ b/src/subcommands/tui/mod.rs @@ -428,7 +428,7 @@ fn render_blocks(state: &State, ctx: RenderContext) { Style::default().modifier(Modifier::BOLD), ), Text::raw(format!( - " commited={}, proposed={}, uncles={}, inputs={}, outputs={}, cellbase={}", + " committed={}, proposed={}, uncles={}, inputs={}, outputs={}, cellbase={}", block.commit_tx_count, block.proposal_tx_count, block.uncle_count, diff --git a/src/subcommands/tx.rs b/src/subcommands/tx.rs index 53f64792..7bda6300 100644 --- a/src/subcommands/tx.rs +++ b/src/subcommands/tx.rs @@ -669,7 +669,7 @@ fn get_keystore_signer( )?; if data.len() != 65 { Err(format!( - "Invalid signature data lenght: {}, data: {:?}", + "Invalid signature data length: {}, data: {:?}", data.len(), data )) diff --git a/src/utils/other.rs b/src/utils/other.rs index 0ce89d19..90ee628a 100644 --- a/src/utils/other.rs +++ b/src/utils/other.rs @@ -106,7 +106,7 @@ pub fn get_signer( )?; if data.len() != 65 { Err(format!( - "Invalid signature data lenght: {}, data: {:?}", + "Invalid signature data length: {}, data: {:?}", data.len(), data )) diff --git a/src/utils/yaml_ser.rs b/src/utils/yaml_ser.rs index 681e5336..a1b329ce 100644 --- a/src/utils/yaml_ser.rs +++ b/src/utils/yaml_ser.rs @@ -264,7 +264,7 @@ impl<'a> YamlEmitter<'a> { /// Emit a yaml as a hash or array value: i.e., which should appear /// following a ":" or "-", either after a space, or on a new line. - /// If `inline` is true, then the preceeding characters are distinct + /// If `inline` is true, then the preceding characters are distinct /// and short enough to respect the compact flag. fn emit_val(&mut self, inline: bool, val: &Yaml) -> EmitResult { match *val { diff --git a/test/src/miner.rs b/test/src/miner.rs index 9c7767f2..03d51b11 100644 --- a/test/src/miner.rs +++ b/test/src/miner.rs @@ -142,7 +142,7 @@ impl Miner { count += 1; if count > 900 { - panic!("wait transaction to commited failed"); + panic!("wait transaction to committed failed"); } thread::sleep(Duration::from_millis(20)); }