diff --git a/substrate/node/src/service.rs b/substrate/node/src/service.rs index bc2e9745..88610c51 100644 --- a/substrate/node/src/service.rs +++ b/substrate/node/src/service.rs @@ -223,6 +223,7 @@ pub async fn new_full(config: Configuration) -> Result TendermintAuthority { /// as it will not return until the P2P stack shuts down. pub async fn authority( mut self, + validator: (u16, Arc), providers: T::CIDP, env: T::Environment, network: T::Network, - validator: (u16, T::Keystore), registry: Option<&Registry>, ) { let (best_hash, last) = self.get_last(); diff --git a/substrate/tendermint/client/src/lib.rs b/substrate/tendermint/client/src/lib.rs index 859bd304..c9175d88 100644 --- a/substrate/tendermint/client/src/lib.rs +++ b/substrate/tendermint/client/src/lib.rs @@ -1,7 +1,6 @@ use std::sync::Arc; use sp_core::crypto::KeyTypeId; -use sp_keystore::CryptoStore; use sp_inherents::CreateInherentDataProviders; use sp_runtime::traits::{Header, Block}; use sp_blockchain::HeaderBackend; @@ -58,8 +57,6 @@ pub trait TendermintClient: Send + Sync + 'static { + Finalizer + ProvideRuntimeApi + 'static; - - type Keystore: CryptoStore; } /// Trait implementable on firm types to automatically provide a full TendermintClient impl. @@ -77,8 +74,6 @@ pub trait TendermintClientMinimal: Send + Sync + 'static { + Finalizer + ProvideRuntimeApi + 'static; - - type Keystore: CryptoStore; } impl TendermintClient for T @@ -96,8 +91,6 @@ where type StateBackend = StateBackendFor; type Api = >::Api; type Client = T::Client; - - type Keystore = T::Keystore; } /// Trait consolidating additional generics required by sc_tendermint for authoring. diff --git a/substrate/tendermint/client/src/validators.rs b/substrate/tendermint/client/src/validators.rs index fe718b85..01b37443 100644 --- a/substrate/tendermint/client/src/validators.rs +++ b/substrate/tendermint/client/src/validators.rs @@ -85,7 +85,7 @@ impl Deref for Refresh { /// Tendermint validators observer, providing data on the active validators. pub struct TendermintValidators( Refresh, - Arc>>, + Arc>>>, ); impl TendermintValidators { @@ -99,7 +99,7 @@ impl TendermintValidators { ) } - pub(crate) async fn set_keys(&self, keys: T::Keystore) { + pub(crate) async fn set_keys(&self, keys: Arc) { *self.1.write().await = Some(keys); } }