Create an account for chain=dev (#5612)

* implement From<&'static str> for Secret

* Dev account.

* Fix Secret semantics.
This commit is contained in:
Tomasz Drwięga
2017-05-19 17:06:36 +02:00
committed by Gav Wood
parent e7abd3510a
commit 3ff72794e5
27 changed files with 83 additions and 45 deletions

View File

@@ -1242,7 +1242,7 @@ fn load_key(path: &Path) -> Option<Secret> {
fn key_save_load() {
use ::devtools::RandomTempPath;
let temp_path = RandomTempPath::create_dir();
let key = Secret::from_slice(&H256::random()).unwrap();
let key = H256::random().into();
save_key(temp_path.as_path(), &key);
let r = load_key(temp_path.as_path());
assert_eq!(key, r.unwrap());