Skip to content

Commit d8a069c

Browse files
gzliudanmrx
and
mrx
committed
accounts/abi/bin/backends: return basefee in suggestGasPrice (ethereum#23838)
Co-authored-by: mrx <[email protected]>
1 parent b5606fa commit d8a069c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

accounts/abi/bind/backends/simulated_test.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -883,8 +883,12 @@ func TestSuggestGasPrice(t *testing.T) {
883883
if err != nil {
884884
t.Errorf("could not get gas price: %v", err)
885885
}
886-
if gasPrice.Uint64() != uint64(1) {
887-
t.Errorf("gas price was not expected value of 1. actual: %v", gasPrice.Uint64())
886+
baseFee := sim.pendingBlock.Header().BaseFee
887+
if baseFee == nil {
888+
baseFee = big.NewInt(1)
889+
}
890+
if gasPrice.Uint64() != baseFee.Uint64() {
891+
t.Errorf("gas price was not expected value of %v. actual: %v", sim.pendingBlock.Header().BaseFee.Uint64(), gasPrice.Uint64())
888892
}
889893
}
890894

0 commit comments

Comments
 (0)