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

feat(rpc): Allow negative heights in rpc methods #9292

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oxarbitrage
Copy link
Contributor

Motivation

We want to support negative heights in RPC methods when HashOrHeight is supported.

Close #9025

Solution

Added a NegativeHeight variant to HashOrHeight enum.

Tests

Added checks in the getblock_rpc test for the getblock call. Other calls that use HashOrHeight are supported but not tested. Can add more tests if anyone think is needed.

PR Checklist

  • The PR name is suitable for the release notes.
  • The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.
  • If the PR shouldn't be in the release notes, it has the
    C-exclude-from-changelog label.

@oxarbitrage oxarbitrage added A-rpc Area: Remote Procedure Call interfaces A-compatibility Area: Compatibility with other nodes or wallets, or standard rules P-Medium ⚡ labels Feb 22, 2025
@oxarbitrage oxarbitrage self-assigned this Feb 22, 2025
@oxarbitrage oxarbitrage requested a review from a team as a code owner February 22, 2025 16:02
@oxarbitrage oxarbitrage requested review from upbqdn and removed request for a team February 22, 2025 16:02
@github-actions github-actions bot added the C-feature Category: New features label Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compatibility Area: Compatibility with other nodes or wallets, or standard rules A-rpc Area: Remote Procedure Call interfaces C-feature Category: New features P-Medium ⚡
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rpc: support negative heights
1 participant