Skip to content

Add Connection#get_block_height - #26

Merged
sebscholl merged 1 commit into
mainfrom
feature/connection-get-block-height
Jul 3, 2026
Merged

Add Connection#get_block_height#26
sebscholl merged 1 commit into
mainfrom
feature/connection-get-block-height

Conversation

@fulf

@fulf fulf commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Adds Connection#get_block_height — the getBlockHeight RPC call, defaulting to the connection's commitment so comparisons against the lastValidBlockHeight from get_latest_blockhash stay apples-to-apples.

Covered by validator-backed tests and documented on the Connection & RPC page. No version bump.

rake test: 330 runs, 0 failures · rubocop: clean

🤖 Generated with Claude Code

Expose the getBlockHeight RPC call so callers can compare the chain's
current height against the lastValidBlockHeight returned by
get_latest_blockhash — the standard blockhash-expiry check. Defaults to
the connection's commitment so the comparison stays apples-to-apples.
Covered by validator-backed tests and documented on the Connection &
RPC page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sebscholl

Copy link
Copy Markdown
Collaborator

This looks good. Thank you.

@sebscholl
sebscholl merged commit 974c8de into main Jul 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants