Add util/mem to zero out memory on drop. (#8356)

* Add `util/mem` to zero out memory on drop.

* Remove nonsense.

* Remove `Into` impls for `Memzero`.

* Update ethereum-types and remove H256Mut.
This commit is contained in:
Toralf Wittner
2018-04-11 13:57:12 +02:00
committed by Marek Kotewicz
parent dd2c27958c
commit 2b05eb43a9
20 changed files with 190 additions and 95 deletions

View File

@@ -329,7 +329,7 @@ fn rpc_eth_submit_hashrate() {
fn rpc_eth_sign() {
let tester = EthTester::default();
let account = tester.accounts_provider.insert_account(Secret::from_slice(&[69u8; 32]), "abcd").unwrap();
let account = tester.accounts_provider.insert_account(Secret::from([69u8; 32]), "abcd").unwrap();
tester.accounts_provider.unlock_account_permanently(account, "abcd".into()).unwrap();
let _message = "0cc175b9c0f1b6a831c399e26977266192eb5ffee6ae2fec3ad71c777531578f".from_hex().unwrap();

View File

@@ -211,7 +211,7 @@ fn should_sign_if_account_is_unlocked() {
// given
let tester = eth_signing();
let data = vec![5u8];
let acc = tester.accounts.insert_account(Secret::from_slice(&[69u8; 32]), "test").unwrap();
let acc = tester.accounts.insert_account(Secret::from([69u8; 32]), "test").unwrap();
tester.accounts.unlock_account_permanently(acc, "test".into()).unwrap();
// when