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

Respond to getblockchaininfo with genesis block when empty state #9138

Conversation

elijahhampton
Copy link
Contributor

@elijahhampton elijahhampton commented Jan 17, 2025

Motivation

A lightwalletd test fails for getblockchaininfo when the state is empty. This PR refactors the rpc request to return the genesis block.

Specifications & References

Solution

Adds a test for returning the genesis state in prop.rs. Refactors getblockchaininfo rpc to return the genesis block if TipPoolValues request fails.

Tests

Follow-up Work

PR Author's Checklist

  • The PR name will make sense to users.
  • The PR provides a CHANGELOG summary.
  • The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.

PR Reviewer's Checklist

  • The PR Author's checklist is complete.
  • The PR resolves the issue.

@elijahhampton elijahhampton requested a review from a team as a code owner January 17, 2025 21:35
@elijahhampton elijahhampton requested review from oxarbitrage and removed request for a team January 17, 2025 21:35
@mpguerra mpguerra linked an issue Jan 20, 2025 that may be closed by this pull request
oxarbitrage
oxarbitrage previously approved these changes Jan 20, 2025
Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good, thank you for making it. There are a few non used imports that need to be fixed. I also left some small optional suggestions in the test code.

zebra-rpc/src/methods/tests/prop.rs Show resolved Hide resolved
zebra-rpc/src/methods/tests/prop.rs Outdated Show resolved Hide resolved
zebra-rpc/src/methods/tests/prop.rs Outdated Show resolved Hide resolved
zebra-rpc/src/methods/tests/prop.rs Outdated Show resolved Hide resolved
mergify bot added a commit that referenced this pull request Jan 22, 2025
Copy link
Contributor

mergify bot commented Jan 22, 2025

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks:

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

@mpguerra
Copy link
Contributor

@mergify requeue

Copy link
Contributor

mergify bot commented Jan 23, 2025

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

mergify bot added a commit that referenced this pull request Jan 23, 2025
@mergify mergify bot merged commit 8b84017 into ZcashFoundation:main Jan 23, 2025
86 checks 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.

bug: Respond to getblockchaininfo requests when the state is empty
3 participants