Skip to content

Commit

Permalink
fix(op-geth): fix sort bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
redhdx committed Aug 5, 2024
1 parent 81a33bb commit 167d08f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miner/worker_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (w *worker) generateOrderedBundles(
// sort bundles according to gas price computed when received
slices.SortStableFunc(bundles, func(i, j *types.Bundle) int {
priceI, priceJ := i.Price, j.Price
return priceI.Cmp(priceJ)
return priceJ.Cmp(priceI)
})

// recompute bundle gas price based on the same state and current env
Expand All @@ -192,7 +192,7 @@ func (w *worker) generateOrderedBundles(
// sort bundles according to fresh gas price
slices.SortStableFunc(simulatedBundles, func(i, j *types.SimulatedBundle) int {
priceI, priceJ := i.BundleGasPrice, j.BundleGasPrice
return priceI.Cmp(priceJ)
return priceJ.Cmp(priceI)
})

// merge bundles based on iterative state
Expand Down

0 comments on commit 167d08f

Please sign in to comment.