Remove EPOCH_INTERVAL

This commit is contained in:
Luke Parker
2024-06-10 08:40:31 -04:00
parent 6a7d803fe7
commit 70add5b270
2 changed files with 31 additions and 17 deletions

View File

@@ -196,10 +196,10 @@ impl Serai {
}
async fn active_network_validators(&self, network: NetworkId) -> Result<Vec<Public>, SeraiError> {
let hash: String = self
let validators: String = self
.call("state_call", ["SeraiRuntimeApi_validators".to_string(), hex::encode(network.encode())])
.await?;
let bytes = Self::hex_decode(hash)?;
let bytes = Self::hex_decode(validators)?;
let r = Vec::<Public>::decode(&mut bytes.as_slice())
.map_err(|e| SeraiError::ErrorInResponse(e.to_string()))?;
Ok(r)