Skip to content

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
@MCollector MCollector deleted the blockhash_update branch February 10, 2025 16:21
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