Skip to content

Commit

Permalink
Merge pull request #65 from bnb-chain/develop
Browse files Browse the repository at this point in the history
fix: add system transaction check in `collect_system_reward` (#63)
  • Loading branch information
pythonberg1997 authored Aug 23, 2024
2 parents 8675437 + 8deac3a commit 0ba000f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/revm/src/bsc/handler_register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ pub fn collect_system_reward<SPEC: Spec, EXT, DB: Database>(
context: &mut Context<EXT, DB>,
gas: &Gas,
) -> Result<(), EVMError<DB::Error>> {
if context
.evm
.env
.tx
.bsc
.is_system_transaction
.unwrap_or(false)
{
return Ok(());
}

let effective_gas_price = context.evm.env.effective_gas_price();
let mut tx_fee = U256::from(gas.spent() - gas.refunded() as u64) * effective_gas_price;

Expand Down

0 comments on commit 0ba000f

Please sign in to comment.