Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Fixed typo and json standards in the document #27557

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

JaisPiyush
Copy link
Contributor

Summary

JSON RPC API had object member name typo, basically account_keys and accountKeys were pointing towards same property of the object accountKeys. In the getBlock method request parameter, the commitment parameter was defined without providing the argument name. Upon misinterpretation it will cause JSON parse error.

Fixes #

  • Changed account_keys to accountKeys
  • added argument name commitment after testing the request parameters.

@mergify mergify bot added the community Community contribution label Sep 1, 2022
@mergify mergify bot requested a review from a team September 1, 2022 19:36
Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@@ -413,7 +413,7 @@ Returns identity and transaction information about a confirmed block in the ledg
["jsonParsed" encoding](jsonrpc-api.md#parsed-responses) attempts to use program-specific instruction parsers to return more human-readable and explicit data in the `transaction.message.instructions` list. If "jsonParsed" is requested but a parser cannot be found, the instruction falls back to regular JSON encoding (`accounts`, `data`, and `programIdIndex` fields).
- (optional) `transactionDetails: <string>` - level of transaction detail to return, either "full", "signatures", or "none". If parameter not provided, the default detail level is "full".
- (optional) `rewards: bool` - whether to populate the `rewards` array. If parameter not provided, the default includes rewards.
- (optional) [Commitment](jsonrpc-api.md#configuring-state-commitment); "processed" is not supported. If parameter not provided, the default is "finalized".
- (optional) `commitment: <string>` - [Commitment](jsonrpc-api.md#configuring-state-commitment); "processed" is not supported. If parameter not provided, the default is "finalized".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are some other places we follow this pattern, but I'll fix them up.

@CriesofCarrots CriesofCarrots merged commit b200217 into solana-labs:master Sep 1, 2022
mergify bot pushed a commit that referenced this pull request Sep 1, 2022
* fixed message.accountKeys typo

* Fixed parameter argument according to json standards

(cherry picked from commit b200217)
mergify bot added a commit that referenced this pull request Sep 1, 2022
Fixed typo and json standards in the document (#27557)

* fixed message.accountKeys typo

* Fixed parameter argument according to json standards

(cherry picked from commit b200217)

Co-authored-by: Piyush Jaiswal <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants