feat(primitives): effective_gas_tip and effective_tip_per_gas functions together (#5144)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
DoTheBestToGetTheBest
2023-11-02 07:31:30 -07:00
committed by GitHub
parent 0449c5eca6
commit 93fc2e2991
7 changed files with 27 additions and 39 deletions

View File

@ -802,8 +802,9 @@ where
}));
// update add to total fees
let miner_fee =
tx.effective_tip_per_gas(base_fee).expect("fee is always valid; execution succeeded");
let miner_fee = tx
.effective_tip_per_gas(Some(base_fee))
.expect("fee is always valid; execution succeeded");
total_fees += U256::from(miner_fee) * U256::from(gas_used);
// append transaction to the list of executed transactions