Skip to content

Commit ec86ab4

Browse files
eval-execCopilotzhangsoledad
authored
docs(rpc): correct PRC typo in docs and comments (#5130)
### What problem does this PR solve? Problem Summary: Several RPC docs and comments use `PRC` instead of `RPC`, which is a typo and can confuse readers. ### What is changed and how it works? What changed: - replace `PRC` with `RPC` in `rpc/README.md` - replace the same typo in `rpc/src/module/chain.rs` - update `rpc/src/server.rs` to refer to the old RPC error response ### Related changes - PR to update `owner/repo`: N/A - Need to cherry-pick to the release branch: N/A ### Check List Tests - No code Side effects - None --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: zhangsoledad <787953403@qq.com>
1 parent b7a78c5 commit ec86ab4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

rpc/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ The RPC returns the block when `block_number` is less than or equal to the tip b
512512
number returned by [`get_tip_block_number`](#tymethod.get_tip_block_number) and returns
513513
null otherwise.
514514

515-
Because of [chain reorganization](#chain-reorganization), the PRC may return null or even
515+
Because of [chain reorganization](#chain-reorganization), the RPC may return null or even
516516
different blocks in different invocations with the same `block_number`.
517517

518518
When `verbosity` is 2, it returns a JSON object as the `result`. See `BlockView` for the
@@ -725,7 +725,7 @@ The RPC returns the block header when `block_number` is less than or equal to th
725725
number returned by [`get_tip_block_number`](#tymethod.get_tip_block_number) and returns
726726
null otherwise.
727727

728-
Because of [chain reorganization](#chain-reorganization), the PRC may return null or even
728+
Because of [chain reorganization](#chain-reorganization), the RPC may return null or even
729729
different block headers in different invocations with the same `block_number`.
730730

731731
When `verbosity` is 1, it returns a JSON object as the `result`. See `HeaderView` for the
@@ -990,7 +990,7 @@ The RPC returns the block hash when `block_number` is less than or equal to the
990990
number returned by [`get_tip_block_number`](#tymethod.get_tip_block_number) and returns
991991
null otherwise.
992992

993-
Because of [chain reorganization](#chain-reorganization), the PRC may return null or even
993+
Because of [chain reorganization](#chain-reorganization), the RPC may return null or even
994994
different block hashes in different invocations with the same `block_number`.
995995

996996
###### Examples

rpc/src/module/chain.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ pub trait ChainRpc {
201201
/// number returned by [`get_tip_block_number`](#tymethod.get_tip_block_number) and returns
202202
/// null otherwise.
203203
///
204-
/// Because of [chain reorganization](#chain-reorganization), the PRC may return null or even
204+
/// Because of [chain reorganization](#chain-reorganization), the RPC may return null or even
205205
/// different blocks in different invocations with the same `block_number`.
206206
///
207207
/// When `verbosity` is 2, it returns a JSON object as the `result`. See `BlockView` for the
@@ -413,7 +413,7 @@ pub trait ChainRpc {
413413
/// number returned by [`get_tip_block_number`](#tymethod.get_tip_block_number) and returns
414414
/// null otherwise.
415415
///
416-
/// Because of [chain reorganization](#chain-reorganization), the PRC may return null or even
416+
/// Because of [chain reorganization](#chain-reorganization), the RPC may return null or even
417417
/// different block headers in different invocations with the same `block_number`.
418418
///
419419
/// When `verbosity` is 1, it returns a JSON object as the `result`. See `HeaderView` for the
@@ -674,7 +674,7 @@ pub trait ChainRpc {
674674
/// number returned by [`get_tip_block_number`](#tymethod.get_tip_block_number) and returns
675675
/// null otherwise.
676676
///
677-
/// Because of [chain reorganization](#chain-reorganization), the PRC may return null or even
677+
/// Because of [chain reorganization](#chain-reorganization), the RPC may return null or even
678678
/// different block hashes in different invocations with the same `block_number`.
679679
///
680680
/// ## Examples

rpc/src/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ async fn ping_handler() -> impl IntoResponse {
204204
"pong"
205205
}
206206

207-
/// used for compatible with old PRC error response for GET
207+
/// Used for compatibility with the old RPC error response for GET requests.
208208
async fn get_error_handler() -> impl IntoResponse {
209209
(
210210
StatusCode::METHOD_NOT_ALLOWED,

0 commit comments

Comments
 (0)