Skip to content

Commit 52bf88f

Browse files
authored
Merge pull request #325 from propeller-heads/ah/ENG-4993/log-missing-code-address
fix: Log any account creation without code.
2 parents 1983a78 + 0a0d5c3 commit 52bf88f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/evm/engine_db/tycho_db.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ impl PreCachedDB {
108108

109109
// We expect the code to be present.
110110
let code = Bytecode::new_raw(AlloyBytes::from(
111-
update
112-
.code
113-
.clone()
114-
.expect("account code"),
111+
update.code.clone().unwrap_or_else(|| {
112+
error!(%update.address, "MissingCode");
113+
Vec::new()
114+
}),
115115
));
116116
// If the balance is not present, we set it to zero.
117117
let balance = update.balance.unwrap_or(U256::ZERO);

0 commit comments

Comments
 (0)