Fix base-path handling in key insert (#7775)

This fixes the handling of base-path when using `key insert`. Before
the base-path wasn't setup correctly, as done when starting a node. This
resulted in putting the keys into the wrong directory. This pr fixes
this by creating the correct base-path/config dir for the keystore.
Besides that it also removes the insert command from `subkey` as it
doesn't make that much sense. If requested, we could bring it back later.
This commit is contained in:
Bastian Köcher
2020-12-28 15:08:30 +01:00
committed by GitHub
parent 6cd8a45292
commit 05ae24d90a
14 changed files with 206 additions and 136 deletions
+1 -3
View File
@@ -167,9 +167,7 @@ impl SyncCryptoStore for LocalKeystore {
let all_keys = SyncCryptoStore::keys(self, id)?
.into_iter()
.collect::<HashSet<_>>();
Ok(keys.into_iter()
.filter(|key| all_keys.contains(key))
.collect::<Vec<_>>())
Ok(keys.into_iter().filter(|key| all_keys.contains(key)).collect::<Vec<_>>())
}
fn sign_with(