Skip to content

Fix doc-comment in RpcTester::fetch_block to reference rpc2 instead of nonexistent truth#27

Open
autumncrypto wants to merge 1 commit intotempoxyz:mainfrom
autumncrypto:autumncrypto-patch-1
Open

Fix doc-comment in RpcTester::fetch_block to reference rpc2 instead of nonexistent truth#27
autumncrypto wants to merge 1 commit intotempoxyz:mainfrom
autumncrypto:autumncrypto-patch-1

Conversation

@autumncrypto
Copy link
Copy Markdown

PR Description (English)

Problem:

In the RpcTester::fetch_block method, the documentation comment states that blocks are retrieved from self.truth. However, self.rpc2 is actually used. This appears to serve as the reference RPC node for block data, although it’s not formally documented everywhere. This discrepancy may be misleading.

Solution:

Updated the doc-comment to accurately reflect the implementation:

/// Fetches block and block identifiers from `self.rpc2`.

Changes:

  • Only the comment is modified; the function’s logic remains unchanged.
  • Improves readability and correctness of the documentation.

…ad of nonexistent `truth`

PR Description (English)

Problem:
In the RpcTester::fetch_block method, the doc-comment states that blocks are fetched from self.truth. However, the truth field does not exist — blocks are actually fetched from self.rpc2. This discrepancy can mislead readers or developers relying on the documentation.

Solution:
Updated the doc-comment to accurately reflect the implementation:
```rust
/// Fetches block and block identifiers from `self.rpc2`.
```
Changes:

Only the comment is modified; the function’s logic remains unchanged.
Improves readability and correctness of the documentation.

Additional Notes:

The comment now explicitly mentions the “reference RPC,” making it clearer for new developers.
No other code dependencies on truth exist; no side effects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant