mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 13:09:24 +00:00
Manually insert the authority discovery key into the keystore
I did try pulling in `pallet-authority-discovery` for this, updating `SessionKeys`, but that was insufficient for whatever reason.
This commit is contained in:
@@ -315,7 +315,7 @@ impl Serai {
|
||||
&self,
|
||||
network: NetworkId,
|
||||
) -> Result<Vec<multiaddr::Multiaddr>, SeraiError> {
|
||||
self.call("p2p_validators", network).await
|
||||
self.call("p2p_validators", [network]).await
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ where
|
||||
authority_discovery_module.register_async_method(
|
||||
"p2p_validators",
|
||||
|params, context, _ext| async move {
|
||||
let network: NetworkId = params.parse()?;
|
||||
let [network]: [NetworkId; 1] = params.parse()?;
|
||||
let (id, client, authority_discovery) = &*context;
|
||||
let latest_block = client.info().best_hash;
|
||||
|
||||
|
||||
@@ -287,6 +287,9 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
||||
|
||||
let role = config.role;
|
||||
let keystore = keystore_container;
|
||||
if let Some(seed) = config.dev_key_seed.as_ref() {
|
||||
let _ = keystore.sr25519_generate_new(sp_core::crypto::key_types::AUTHORITY_DISCOVERY, Some(seed));
|
||||
}
|
||||
let prometheus_registry = config.prometheus_registry().cloned();
|
||||
|
||||
// TODO: Ensure we're considered as an authority is a validator of an external network
|
||||
|
||||
Reference in New Issue
Block a user