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

Updated GetRecentBlockHash to GetLatestBlockHash #56

Merged
merged 3 commits into from
Feb 1, 2025

Conversation

MCollector
Copy link
Contributor

@MCollector MCollector commented Jan 31, 2025

Updated GetRecentBlockHash to GetLatestBlockHash instances on the Soana RPC Client. Included core code and tests, but left interface-instances for convenience.

Status Type ⚠️ Core Change Issue
Ready Hotfix No

Problem

GetRecentBlockHash is deprecated and some Nodes do not support this call anymore (ie Helius)

Solution

Replaced all the calls with GetLatestBlockHash() which is the advised RPC Call.

…ana RPC Client. Included core code and tests, but left interface-instances for convenience.
@GabrielePicco GabrielePicco changed the title Updated GetRecentBlockHash to GetLatestBlockHash instances on the Sol… Updated GetRecentBlockHash to GetLatestBlockHash Jan 31, 2025
@GabrielePicco GabrielePicco self-requested a review January 31, 2025 09:15
Copy link
Contributor

@GabrielePicco GabrielePicco left a comment

Choose a reason for hiding this comment

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

Thanks @MCollector for the contribution! Changes overall look great, but using Result instead of await on RPC calls results in unexpected behaviour in some environment (e.g. Unity WebGL).
Please update the PR so that it always await on GetLatestBlockHashAsync()

Copy link
Contributor

@GabrielePicco GabrielePicco left a comment

Choose a reason for hiding this comment

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

Thanks again for the contribution. It looks ready, but please use var instead of the explicit types (e.g RequestResult<Solana.Unity.Rpc.Messages.ResponseValue<LatestBlockHash>>) to improve source-code readability

Copy link
Contributor

@GabrielePicco GabrielePicco left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@GabrielePicco GabrielePicco merged commit af49063 into magicblock-labs:master Feb 1, 2025
1 check failed
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