Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions testing/testing-utils/src/genesis_allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl<'a> GenesisAllocator<'a> {
/// Returns the key pair for the account and the account's address.
pub fn new_funded_account(&mut self, balance: U256) -> (Keypair, Address) {
let secp = Secp256k1::new();
let pair = Keypair::new(&secp, &mut self.rng);
let pair = Keypair::new(&secp, &mut *self.rng);
let address = public_key_to_address(pair.public_key());

self.alloc.insert(address, GenesisAccount::default().with_balance(balance));
Expand All @@ -88,7 +88,7 @@ impl<'a> GenesisAllocator<'a> {
code: Bytes,
) -> (Keypair, Address) {
let secp = Secp256k1::new();
let pair = Keypair::new(&secp, &mut self.rng);
let pair = Keypair::new(&secp, &mut *self.rng);
let address = public_key_to_address(pair.public_key());

self.alloc
Expand All @@ -106,7 +106,7 @@ impl<'a> GenesisAllocator<'a> {
storage: BTreeMap<B256, B256>,
) -> (Keypair, Address) {
let secp = Secp256k1::new();
let pair = Keypair::new(&secp, &mut self.rng);
let pair = Keypair::new(&secp, &mut *self.rng);
let address = public_key_to_address(pair.public_key());

self.alloc.insert(
Expand All @@ -126,7 +126,7 @@ impl<'a> GenesisAllocator<'a> {
storage: BTreeMap<B256, B256>,
) -> (Keypair, Address) {
let secp = Secp256k1::new();
let pair = Keypair::new(&secp, &mut self.rng);
let pair = Keypair::new(&secp, &mut *self.rng);
let address = public_key_to_address(pair.public_key());

self.alloc.insert(
Expand All @@ -142,7 +142,7 @@ impl<'a> GenesisAllocator<'a> {
/// Returns the key pair for the account and the account's address.
pub fn new_account_with_code(&mut self, code: Bytes) -> (Keypair, Address) {
let secp = Secp256k1::new();
let pair = Keypair::new(&secp, &mut self.rng);
let pair = Keypair::new(&secp, &mut *self.rng);
let address = public_key_to_address(pair.public_key());

self.alloc.insert(address, GenesisAccount::default().with_code(Some(code)));
Expand All @@ -163,7 +163,7 @@ impl<'a> GenesisAllocator<'a> {
/// Returns the key pair for the account and the account's address.
pub fn add_account(&mut self, account: GenesisAccount) -> Address {
let secp = Secp256k1::new();
let pair = Keypair::new(&secp, &mut self.rng);
let pair = Keypair::new(&secp, &mut *self.rng);
let address = public_key_to_address(pair.public_key());

self.alloc.insert(address, account);
Expand Down