Skip to content

Commit

Permalink
fix: out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed Mar 13, 2024
1 parent d77f7a4 commit babd9a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package miner

import (
"errors"
"fmt"
"math/big"
"sync"
Expand Down Expand Up @@ -341,5 +342,10 @@ func (miner *Miner) SimulateBundle(bundle *types.Bundle) (*big.Int, error) {
if err != nil {
return nil, err
}

if len(s) == 0 {
return nil, errors.New("no valid sim result")
}

return s[0].BundleGasPrice, nil
}

0 comments on commit babd9a4

Please sign in to comment.