preFix = UnconfirmedTxPrefix
}
- itr := w.DB.IteratorPrefixWithStart([]byte(preFix), startKey)
+ itr := w.DB.IteratorPrefixWithStart([]byte(preFix), startKey, true)
defer itr.Release()
for txNum := count; itr.Next() && txNum > 0; txNum-- {
if unconfirmed {
sort.Sort(SortByTimestamp(annotatedTxs))
+ } else {
+ sort.Sort(SortByHeight(annotatedTxs))
}
return annotatedTxs, nil