diff --git a/app/abci_utils.go b/app/abci_utils.go index 0d51e4ae..c43e9938 100644 --- a/app/abci_utils.go +++ b/app/abci_utils.go @@ -466,45 +466,3 @@ func utilCosmosDemonGasPriceToEvmDemonGasPrice(gasGroup sdk.Coins) (*big.Int, er func utilCosmosDemonGasLimitToEvmDemonGasLimit(gasLimit uint64) uint64 { return gasLimit * chaincfg.GasDenomConversionMultiplier } - -func findFirstContinuousDecreasingSubsequence(data []*txnInfo) int { - ll := len(data) - if ll < 2 { - return ll - } - - for i := 0; i < ll-1; i++ { - if data[i].gasPrice.Cmp(data[i+1].gasPrice) >= 0 { - end := i + 1 - for ; end < ll && data[end-1].gasPrice.Cmp(data[end].gasPrice) > 0; end++ { - } - if end == ll || data[end-1].gasPrice.Cmp(data[end].gasPrice) <= 0 { - return end - } - } else { - return i + 1 - } - } - - return ll -} - -func mergeSort(size int, left, right []*txnInfo) []*txnInfo { - result := make([]*txnInfo, 0, size) - i, j := 0, 0 - - for i < len(left) && j < len(right) { - if left[i].gasPrice.Cmp(right[j].gasPrice) > 0 { - result = append(result, left[i]) - i++ - } else { - result = append(result, right[j]) - j++ - } - } - - result = append(result, left[i:]...) - result = append(result, right[j:]...) - - return result -}