rustfmt ghost slow clap and fix typos

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2025-07-29 14:58:23 +03:00
parent 792e70c988
commit 7216f1d82b
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
2 changed files with 15 additions and 11 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "ghost-slow-clap"
version = "0.3.34"
version = "0.3.35"
description = "Applause protocol for the EVM bridge"
license.workspace = true
authors.workspace = true

View File

@ -702,23 +702,27 @@ impl<T: Config> Pallet<T> {
);
let random_seed = sp_io::offchain::random_seed();
let random_number = <u32>::decode(
&mut TrailingZeroInput::new(random_seed.as_ref())
).expect("input is padded with zeroes; qed");
let random_number = <u32>::decode(&mut TrailingZeroInput::new(random_seed.as_ref()))
.expect("input is padded with zeroes; qed");
let rpc_endpoint = if stored_endpoints.len() > 0 {
stored_endpoints
.iter()
.nth((random_number as usize)
.nth(
(random_number as usize)
.checked_rem(stored_endpoints.len())
.unwrap_or_default())
.unwrap_or_default(),
)
.expect("stored endpoint should be non empty; qed")
} else {
network_data.default_endpoints
network_data
.default_endpoints
.iter()
.nth((random_number as usize)
.nth(
(random_number as usize)
.checked_rem(network_data.default_endpoints.len())
.unwrap_or_default())
.unwrap_or_default(),
)
.expect("default endpoint should be non empty; qed")
};