Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] remove incorrect pubkey param from getEpochInfo #31651

Merged
merged 1 commit into from May 16, 2023

Conversation

mcintyre94
Copy link
Contributor

@mcintyre94 mcintyre94 commented May 15, 2023

This PR removes an incorrect address parameter from the docs for getEpochInfo

Relevant source code:

pub fn get_epoch_info(&self) -> ClientResult<EpochInfo> {
self.invoke((self.rpc_client.as_ref()).get_epoch_info())
}

pub fn get_epoch_info_with_commitment(
&self,
commitment_config: CommitmentConfig,
) -> ClientResult<EpochInfo> {
self.invoke((self.rpc_client.as_ref()).get_epoch_info_with_commitment(commitment_config))
}

As far as I can tell there's no path where an address is used in the getEpochInfo call

In addition making the RPC call:

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getEpochInfo",
    "params": [
        "H3BRzVGdedrBQD9wFitEbzEBhRoPXTemopuvS8AcNxLy"
    ]
}

Gives the error:

    "error": {
        "code": -32602,
        "message": "Invalid params: invalid type: string \"H3BRzVGdedrBQD9wFitEbzEBhRoPXTemopuvS8AcNxLy\", expected struct RpcContextConfig."
    },

@CriesofCarrots
Copy link
Contributor

Ah sorry, I saw the notification on this come through, but I see you've already requested a reviewer. I'll defer :)

@nickfrosty nickfrosty added automerge Merge this Pull Request automatically once CI passes v1.14 labels May 16, 2023
@mergify mergify bot merged commit 16381d8 into solana-labs:master May 16, 2023
8 checks passed
mergify bot pushed a commit that referenced this pull request May 16, 2023
Co-authored-by: Callum McIntyre <callum.mcintyre@solana.com>
(cherry picked from commit 16381d8)
jacobcreech pushed a commit that referenced this pull request May 16, 2023
…rt of #31651) (#31674)

[docs] remove incorrect pubkey param from getEpochInfo (#31651)

Co-authored-by: Callum McIntyre <callum.mcintyre@solana.com>
(cherry picked from commit 16381d8)

Co-authored-by: Callum McIntyre <mcintyre1994@gmail.com>
@mcintyre94 mcintyre94 deleted the get-epoch-info-docs branch May 17, 2023 16:40
wen-coding pushed a commit to wen-coding/solana that referenced this pull request May 18, 2023
…1651)

Co-authored-by: Callum McIntyre <callum.mcintyre@solana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants