Skip to content

Commit

Permalink
feat: verify sender's balance (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
enitrat authored Mar 12, 2024
1 parent 110621c commit 6fefabc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/ef-testing/src/models/case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,10 @@ impl BlockchainTestCase {

// Balance
let mut actual = sequencer.balance_at(address)?;
// Subtract transaction cost to sender balance
if address.0 == sender_address {
actual -= transaction_cost;
}
// Add priority fee to coinbase balance

// Our coinbase should receive all of the txs fees, not only the priority fee.
if *address == coinbase {
actual += (gas_price - base_fee_per_gas) * expected_gas_used;
actual -= base_fee_per_gas * expected_gas_used;
}
if actual != expected_state.balance {
let balance_diff = format!(
Expand Down

0 comments on commit 6fefabc

Please sign in to comment.