Skip to content

rpc: map height=0 to no parameters in the http call #118

@ebuchman

Description

@ebuchman

Tendermint RPC has some endpoints which allow you to specify height parameter, but if left empty it will return information from the latest height. This is distinct from RPC requests with height=0 set explicitly, which return errors.

The RPC client should respect this. For instance, this was done for the /commit endpoint here: 7477c9d. It should be done for others as well.

That said, these RPC methods shouldn't take a Height that can be 0 - they should instead take an enum that contains either a Height, or some indicator for LatestHeight, which maps to empty parameters in the underlying RPC call - ie. #117 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    rpcstructureHigh level repo-wide structural concerns

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions