Skip to content

Commit 8736651

Browse files
authored
fix: dont include code in post state if disabled (#366)
closes paradigmxyz/reth#18942 we should not set this if code is disabled in the config
1 parent 7124ebd commit 8736651

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tracing/builder/geth.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,12 @@ impl<'a> GethTraceBuilder<'a> {
295295
let mut post_state = AccountState::from_account_info(
296296
changed_acc.info.nonce,
297297
changed_acc.info.balance,
298-
changed_acc.info.code.as_ref().map(|code| code.original_bytes()),
298+
code_enabled
299+
.then(|| {
300+
// Note: the changed account from the state output always holds the code
301+
changed_acc.info.code.as_ref().map(|code| code.original_bytes())
302+
})
303+
.flatten(),
299304
);
300305

301306
// handle storage changes

0 commit comments

Comments
 (0)