|
@ -4,6 +4,7 @@ import ( |
|
|
"bytes" |
|
|
"bytes" |
|
|
"encoding/hex" |
|
|
"encoding/hex" |
|
|
"fmt" |
|
|
"fmt" |
|
|
|
|
|
"sort" |
|
|
"strconv" |
|
|
"strconv" |
|
|
"strings" |
|
|
"strings" |
|
|
"time" |
|
|
"time" |
|
@ -202,6 +203,11 @@ func (txi *TxIndex) Search(q *query.Query) ([]*types.TxResult, error) { |
|
|
i++ |
|
|
i++ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// sort by height by default
|
|
|
|
|
|
sort.Slice(results, func(i, j int) bool { |
|
|
|
|
|
return results[i].Height < results[j].Height |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
return results, nil |
|
|
return results, nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|