Skip to content

fix(rpc): allow query latest block#1760

Merged
tuxcanfly merged 1 commit intomainfrom
tux/fix-rpc-param-block-height
Jul 6, 2024
Merged

fix(rpc): allow query latest block#1760
tuxcanfly merged 1 commit intomainfrom
tux/fix-rpc-param-block-height

Conversation

@tuxcanfly
Copy link
Collaborator

@tuxcanfly tuxcanfly commented Jul 5, 2024

Overview

Allow querying latest /block without requiring ?height= param for CometBFT compat.

Fixes #1758

Summary by CodeRabbit

  • New Features

    • Enhanced parameter handling to support *StrInt64 type with improved error handling.
  • Bug Fixes

    • Fixed handling of nullable Height parameter in Block function to prevent potential dereference issues.
  • Tests

    • Updated test cases to cover scenarios for valid/malformed requests and different parameter conditions.
  • Refactor

    • Modified Height field in blockArgs struct to use *StrInt64 for better nullability support.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix CometBFT RPC compatibility

6 participants