Keystore overhaul (iter 2) (#13634)

* Remove bloat about remote keystore

* Update docs and remove unused 'KeystoreRef' trait

* Use wherever possible, MemoryKeystore for testing

* Remove unrequired fully qualified method syntax for Keystore
This commit is contained in:
Davide Galassi
2023-03-20 19:21:26 +01:00
committed by GitHub
parent faaa0c2851
commit 480396fe06
44 changed files with 312 additions and 457 deletions
+2 -3
View File
@@ -160,12 +160,11 @@ pub mod mock {
impl super::Config for Test {}
pub fn new_test_ext() -> sp_io::TestExternalities {
use sp_keystore::{testing::MemoryKeystore, KeystoreExt, KeystorePtr};
use sp_std::sync::Arc;
use sp_keystore::{testing::MemoryKeystore, KeystoreExt};
let t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
let mut ext = sp_io::TestExternalities::new(t);
ext.register_extension(KeystoreExt(Arc::new(MemoryKeystore::new()) as KeystorePtr));
ext.register_extension(KeystoreExt::new(MemoryKeystore::new()));
ext
}