Keystore overhaul (#13615)

* Remove 'supported_keys' 'sign_with_any' and 'sign_with_all' from keystore trait

* Remove the aync keystore

* Renaming:
- SyncCryptoStore -> Keystore
- SyncCryptoStorePtr -> KeystorePtr
- KeyStore -> MemoryKeystore

* Fix authority discovery worker and tests

* Rename 'insert_unknown' to 'insert'

* Remove leftover
This commit is contained in:
Davide Galassi
2023-03-17 12:24:14 +01:00
committed by GitHub
parent 91bb2d29ca
commit f110941b7f
49 changed files with 317 additions and 820 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ pub use sp_consensus;
pub use sp_keyring::{
ed25519::Keyring as Ed25519Keyring, sr25519::Keyring as Sr25519Keyring, AccountKeyring,
};
pub use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr};
pub use sp_keystore::{Keystore, KeystorePtr};
pub use sp_runtime::{Storage, StorageChild};
pub use sp_state_machine::ExecutionStrategy;
@@ -70,7 +70,7 @@ pub struct TestClientBuilder<Block: BlockT, ExecutorDispatch, Backend: 'static,
child_storage_extension: HashMap<Vec<u8>, StorageChild>,
backend: Arc<Backend>,
_executor: std::marker::PhantomData<ExecutorDispatch>,
keystore: Option<SyncCryptoStorePtr>,
keystore: Option<KeystorePtr>,
fork_blocks: ForkBlocks<Block>,
bad_blocks: BadBlocks<Block>,
enable_offchain_indexing_api: bool,
@@ -128,7 +128,7 @@ impl<Block: BlockT, ExecutorDispatch, Backend, G: GenesisInit>
}
/// Set the keystore that should be used by the externalities.
pub fn set_keystore(mut self, keystore: SyncCryptoStorePtr) -> Self {
pub fn set_keystore(mut self, keystore: KeystorePtr) -> Self {
self.keystore = Some(keystore);
self
}