From d9c07eacd633eb22c2e048ef0278f4d508ab0e4e Mon Sep 17 00:00:00 2001 From: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Date: Tue, 5 Nov 2024 13:15:59 +0100 Subject: [PATCH] refactor(genesis): small refactor (#1618) --- crates/genesis/src/lib.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/crates/genesis/src/lib.rs b/crates/genesis/src/lib.rs index b3f3caadb15..6a25df5898c 100644 --- a/crates/genesis/src/lib.rs +++ b/crates/genesis/src/lib.rs @@ -92,17 +92,10 @@ impl Genesis { }; // fund account - let mut alloc = BTreeMap::default(); - alloc.insert( + let alloc = BTreeMap::from([( signer_addr, - GenesisAccount { - balance: U256::MAX, - nonce: None, - code: None, - storage: None, - private_key: None, - }, - ); + GenesisAccount { balance: U256::MAX, ..Default::default() }, + )]); // put signer address in the extra data, padded by the required amount of zeros // Clique issue: https://github.com/ethereum/EIPs/issues/225