Skip to content

Commit

Permalink
fix: a nil pointer when query bundle price (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun authored May 8, 2024
1 parent b467bae commit f2e3282
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eth/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ func (b *EthAPIBackend) BundlePrice() *big.Int {

gasFloor := big.NewInt(b.eth.config.Miner.MevGasPriceFloor)
idx := len(bundles) / 2
if bundles[idx].Price.Cmp(gasFloor) < 0 {

if bundles[idx] == nil || bundles[idx].Price.Cmp(gasFloor) < 0 {
return gasFloor
}

Expand Down

0 comments on commit f2e3282

Please sign in to comment.