remove useless code

This commit is contained in:
Solovyov1796 2025-02-10 23:13:10 +08:00
parent 4f53e59af7
commit a32dad8373

View File

@ -466,45 +466,3 @@ func utilCosmosDemonGasPriceToEvmDemonGasPrice(gasGroup sdk.Coins) (*big.Int, er
func utilCosmosDemonGasLimitToEvmDemonGasLimit(gasLimit uint64) uint64 { func utilCosmosDemonGasLimitToEvmDemonGasLimit(gasLimit uint64) uint64 {
return gasLimit * chaincfg.GasDenomConversionMultiplier 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
}