mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Update Rust Edition to 2024 (#7766)
* #7749 Thanks @dknopik and @michaelsproul for your help!
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
use crate::{
|
||||
KeyType, ValidatorPath,
|
||||
json_wallet::{
|
||||
Aes128Ctr, ChecksumModule, Cipher, CipherModule, Crypto, EmptyMap, EmptyString, JsonWallet,
|
||||
Kdf, KdfModule, Sha256Checksum, TypeField, Version,
|
||||
},
|
||||
KeyType, ValidatorPath,
|
||||
};
|
||||
pub use bip39::{Mnemonic, Seed as Bip39Seed};
|
||||
pub use eth2_key_derivation::{DerivedKey, DerivedKeyError};
|
||||
use eth2_keystore::{
|
||||
decrypt, default_kdf, encrypt, keypair_from_secret, Keystore, KeystoreBuilder, IV_SIZE,
|
||||
SALT_SIZE,
|
||||
};
|
||||
pub use eth2_keystore::{Error as KeystoreError, PlainText};
|
||||
use eth2_keystore::{
|
||||
IV_SIZE, Keystore, KeystoreBuilder, SALT_SIZE, decrypt, default_kdf, encrypt,
|
||||
keypair_from_secret,
|
||||
};
|
||||
use rand::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::io::{Read, Write};
|
||||
@@ -90,8 +90,8 @@ impl<'a> WalletBuilder<'a> {
|
||||
} else if seed.is_empty() {
|
||||
Err(Error::EmptySeed)
|
||||
} else {
|
||||
let salt = rand::thread_rng().gen::<[u8; SALT_SIZE]>();
|
||||
let iv = rand::thread_rng().gen::<[u8; IV_SIZE]>().to_vec().into();
|
||||
let salt = rand::rng().random::<[u8; SALT_SIZE]>();
|
||||
let iv = rand::rng().random::<[u8; IV_SIZE]>().to_vec().into();
|
||||
|
||||
Ok(Self {
|
||||
seed: seed.to_vec().into(),
|
||||
|
||||
Reference in New Issue
Block a user