Skip to content

Commit

Permalink
tools: fix some typos in comment
Browse files Browse the repository at this point in the history
Signed-off-by: wanshuangcheng <[email protected]>
  • Loading branch information
wanshuangcheng committed Apr 8, 2024
1 parent 414a8fd commit c015927
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/subcommands/tui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ fn render_blocks<B: Backend>(state: &State, ctx: RenderContext<B>) {
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,
Expand Down
2 changes: 1 addition & 1 deletion src/subcommands/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
))
Expand Down
2 changes: 1 addition & 1 deletion src/utils/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
))
Expand Down
2 changes: 1 addition & 1 deletion src/utils/yaml_ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/src/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit c015927

Please sign in to comment.