Skip to content

Commit

Permalink
Don't increase balance in coinbase fee if it's 0
Browse files Browse the repository at this point in the history
  • Loading branch information
maximopalopoli committed Nov 28, 2024
1 parent ceb79b0 commit f1d02c8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions crates/vm/levm/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,13 +543,9 @@ impl VM {
.checked_mul(priority_fee_per_gas)
.ok_or(VMError::BalanceOverflow)?;

self.increase_account_balance(coinbase_address, coinbase_fee)?;

/*
if coinbase_fee.is_zero() {
self.cache.accounts.remove(&coinbase_address);
}
*/
if !coinbase_fee.is_zero() {
self.increase_account_balance(coinbase_address, coinbase_fee)?;
}

report.new_state.clone_from(&self.cache);

Expand Down

0 comments on commit f1d02c8

Please sign in to comment.