Correct Serai header on genesis

Includes a couple misc fixes for the RPC as well.
This commit is contained in:
Luke Parker
2025-11-14 07:22:59 -05:00
parent 6ff0ef7aa6
commit cde0f753c2
11 changed files with 148 additions and 56 deletions

View File

@@ -7,7 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/substrate/client/s
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
keywords = ["serai"]
edition = "2021"
rust-version = "1.85"
rust-version = "1.89"
[package.metadata.docs.rs]
all-features = true

View File

@@ -153,8 +153,7 @@ impl Serai {
/// Fetch a block from the Serai blockchain by its number.
pub async fn block_by_number(&self, block: u64) -> Result<Block, RpcError> {
Self::block_internal(self.call("blockchain/block", &format!(r#"{{ "block": "{block}" }}"#)))
.await
Self::block_internal(self.call("blockchain/block", &format!(r#"{{ "block": {block} }}"#))).await
}
/// Scope this RPC client to the state as of a specific block.

View File

@@ -100,7 +100,7 @@ impl<'a> ValidatorSets<'a> {
.0
.call::<Option<_>>(
"validator-sets/session",
&format!(r#" "network": {} "#, rpc_network(network)?),
&format!(r#", "network": {} "#, rpc_network(network)?),
)
.await?
.map(Session),
@@ -114,7 +114,7 @@ impl<'a> ValidatorSets<'a> {
.0
.call::<Option<_>>(
"validator-sets/current_stake",
&format!(r#" "network": {} "#, rpc_network(network)?),
&format!(r#", "network": {} "#, rpc_network(network)?),
)
.await?
.map(Amount),
@@ -128,7 +128,7 @@ impl<'a> ValidatorSets<'a> {
.call::<Option<String>>(
"validator-sets/keys",
&format!(
r#" "set": {{ "network": {}, "session": {} }} "#,
r#", "set": {{ "network": {}, "session": {} }} "#,
rpc_network(set.network)?,
set.session.0
),