Don't consider the Serai set in the cosigning protocol

The Serai set SHOULD be banned from setting keys so this SHOULD be unreachable.
It's now explicitly unreachable.
This commit is contained in:
Luke Parker
2025-01-04 13:52:17 -05:00
parent 985261574c
commit 4836c1676b

View File

@@ -161,6 +161,11 @@ async fn keys_for_network(
serai: &TemporalSerai<'_>,
network: NetworkId,
) -> Result<Option<(Session, KeyPair)>, String> {
// The Serai network never cosigns so it has no keys for cosigning
if network == NetworkId::Serai {
return Ok(None);
}
let Some(latest_session) =
serai.validator_sets().session(network).await.map_err(|e| format!("{e:?}"))?
else {