Skip to content

Commit c8262c9

Browse files
committed
fixes: check if balance is empty for coinbase
1 parent 059f2ab commit c8262c9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/evm/src/eth/block.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,14 @@ where
310310
}
311311
.to_vec();
312312
tracing::debug!("Before coinbase:{:?}", bal);
313+
313314
if bal.len() == 5 {
314-
bal = bal.into_iter().filter(|a| a.address != self.evm.block().beneficiary()).collect();
315+
bal = bal
316+
.into_iter()
317+
.filter(|a| {
318+
a.address != self.evm.block().beneficiary() && !a.balance_changes.is_empty()
319+
})
320+
.collect();
315321
tracing::debug!("After coinbase:{:?}", bal);
316322
}
317323
Ok((

0 commit comments

Comments
 (0)