Skip to content

Commit f8c354c

Browse files
authored
chore(Test) : const to static (#1016)
1 parent 5431bd2 commit f8c354c

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

bins/revm-test/src/bin/burntpix/main.rs

+17-5
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn svg(filename: String, svg_data: &[u8]) -> Result<(), Box<dyn Error>> {
8484
Ok(())
8585
}
8686

87-
const DEFAULT_SEED: &str = "0xF1FD58E";
87+
const DEFAULT_SEED: &str = "0";
8888
const DEFAULT_ITERATIONS: &str = "0x7A120";
8989
fn try_init_env_vars() -> Result<(u32, U256), Box<dyn Error>> {
9090
let seed_from_env = std::env::var("SEED").unwrap_or(DEFAULT_SEED.to_string());
@@ -113,13 +113,25 @@ fn insert_account_info(cache_db: &mut CacheDB<EmptyDB>, addr: Address, code: Byt
113113
fn init_db() -> CacheDB<EmptyDB> {
114114
let mut cache_db = CacheDB::new(EmptyDB::default());
115115

116-
insert_account_info(&mut cache_db, BURNTPIX_ADDRESS_ONE, BURNTPIX_BYTECODE_ONE);
117-
insert_account_info(&mut cache_db, BURNTPIX_MAIN_ADDRESS, BURNTPIX_BYTECODE_TWO);
118-
insert_account_info(&mut cache_db, BURNTPIX_ADDRESS_TWO, BURNTPIX_BYTECODE_THREE);
116+
insert_account_info(
117+
&mut cache_db,
118+
BURNTPIX_ADDRESS_ONE,
119+
BURNTPIX_BYTECODE_ONE.clone(),
120+
);
121+
insert_account_info(
122+
&mut cache_db,
123+
BURNTPIX_MAIN_ADDRESS,
124+
BURNTPIX_BYTECODE_TWO.clone(),
125+
);
126+
insert_account_info(
127+
&mut cache_db,
128+
BURNTPIX_ADDRESS_TWO,
129+
BURNTPIX_BYTECODE_THREE.clone(),
130+
);
119131
insert_account_info(
120132
&mut cache_db,
121133
BURNTPIX_ADDRESS_THREE,
122-
BURNTPIX_BYTECODE_FOUR,
134+
BURNTPIX_BYTECODE_FOUR.clone(),
123135
);
124136

125137
cache_db

0 commit comments

Comments
 (0)