Skip to content

Commit

Permalink
accounts/abi/bin/backends: return basefee in suggestGasPrice (ethereu…
Browse files Browse the repository at this point in the history
…m#23838)

Co-authored-by: mrx <[email protected]>
  • Loading branch information
gzliudan and mrx committed Jan 22, 2025
1 parent b5606fa commit d8a069c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions accounts/abi/bind/backends/simulated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,8 +883,12 @@ func TestSuggestGasPrice(t *testing.T) {
if err != nil {
t.Errorf("could not get gas price: %v", err)
}
if gasPrice.Uint64() != uint64(1) {
t.Errorf("gas price was not expected value of 1. actual: %v", gasPrice.Uint64())
baseFee := sim.pendingBlock.Header().BaseFee
if baseFee == nil {
baseFee = big.NewInt(1)
}
if gasPrice.Uint64() != baseFee.Uint64() {
t.Errorf("gas price was not expected value of %v. actual: %v", sim.pendingBlock.Header().BaseFee.Uint64(), gasPrice.Uint64())
}
}

Expand Down

0 comments on commit d8a069c

Please sign in to comment.