We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have noticed that subxt requires providing a block hash to download the block or block header.
subxt
How do I get a block hash if I only know its number?
In versions prior 0.34.0 there was the following API:
0.34.0
client.rpc().block_hash(block_id)
Where block_id is a number.
block_id
P.S. Unfortunately, I cannot subscribe to block updates. I use it as described here.
The text was updated successfully, but these errors were encountered:
I found the following way to do it:
let legacy_rpc_client = LegacyRpcMethods::<PolkadotConfig>::new(rpc_client.clone()); legacy_rpc_client.chain_get_block_hash(block_number).await
I have to hold both LegacyRpcMethods and OnlineClient. It might be helpful to be able to get one from another since, anyway, both hold an Arc` to it.
LegacyRpcMethods
. It might be helpful to be able to get one from another since, anyway, both hold an
Sorry, something went wrong.
No branches or pull requests
I have noticed that
subxt
requires providing a block hash to download the block or block header.How do I get a block hash if I only know its number?
In versions prior
0.34.0
there was the following API:Where
block_id
is a number.P.S. Unfortunately, I cannot subscribe to block updates. I use it as described here.
The text was updated successfully, but these errors were encountered: