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

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
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>
bw-solana pushed a commit to bw-solana/solana that referenced this pull request Jan 10, 2025
…rt of solana-labs#31651) (solana-labs#31674)

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

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

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

Successfully merging this pull request may close these issues.

3 participants