Skip to content

Commit 88bd813

Browse files
committed
update doc
1 parent 19a684c commit 88bd813

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

devtools/doc/rpc-gen/src/main.rs

+17-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ fn get_version() -> String {
3232
return version;
3333
}
3434

35-
/// Get git tag from command line
3635
fn get_commit_sha() -> String {
37-
run_command("git", &["rev-parse", "HEAD"], Some(OPENRPC_DIR)).unwrap_or("main".to_string())
36+
let res =
37+
run_command("git", &["rev-parse", "HEAD"], Some(OPENRPC_DIR)).unwrap_or("main".to_string());
38+
eprintln!("commit sha: {:?}", res);
39+
res
3840
}
3941

4042
fn checkout_tag_branch(version: &str) {
@@ -76,6 +78,19 @@ fn dump_openrpc_json() -> Result<(), Box<dyn std::error::Error>> {
7678
"finished dump openrpc json for tag: {:?} at dir: {:?}",
7779
version, json_dir
7880
);
81+
// run git commit all changes before generate rpc readme
82+
run_command("git", &["add", "."], Some(OPENRPC_DIR));
83+
run_command(
84+
"git",
85+
&[
86+
"commit",
87+
"-m",
88+
&format!("update openrpc json for tag: {:?}", version),
89+
],
90+
Some(OPENRPC_DIR),
91+
);
92+
// git push
93+
run_command("git", &["push"], Some(OPENRPC_DIR));
7994
Ok(())
8095
}
8196

rpc/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4633,7 +4633,7 @@ Response
46334633
}
46344634
```
46354635

4636-
RPC Module Subscription that CKB node will push new messages to subscribers.
4636+
RPC Module Subscription that CKB node will push new messages to subscribers, in WebSocket or TCP.
46374637

46384638
RPC subscriptions require a full duplex connection. CKB offers such connections in the form of
46394639
TCP (enable with `rpc.tcp_listen_address` configuration option) and WebSocket (enable with

rpc/src/module/subscription.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use jsonrpc_core::Result;
88
use jsonrpc_utils::{pub_sub::PublishMsg, rpc};
99
use tokio::sync::broadcast;
1010

11-
/// RPC Module Subscription that CKB node will push new messages to subscribers.
11+
/// RPC Module Subscription that CKB node will push new messages to subscribers, in WebSocket or TCP.
1212
///
1313
/// RPC subscriptions require a full duplex connection. CKB offers such connections in the form of
1414
/// TCP (enable with `rpc.tcp_listen_address` configuration option) and WebSocket (enable with

0 commit comments

Comments
 (0)