reverse the order of listtransactions to align with lbrycrd #17

Merged
roylee17 merged 1 commit from roylee/reverse-order-of-listransactions-attempt2 into master 2022-08-09 02:54:42 +02:00

View file

@ -2120,10 +2120,13 @@ func (w *Wallet) ListTransactions(from, count int) ([]btcjson.ListTransactionsRe
// Return newer results first by starting at mempool height and working
// down to the genesis block.
// return w.TxStore.RangeTransactions(txmgrNs, -1, 0, rangeFn)
return w.TxStore.RangeTransactions(txmgrNs, 0, -1, rangeFn)
return w.TxStore.RangeTransactions(txmgrNs, -1, 0, rangeFn)
})
for i, j := 0, len(txList)-1; i < j; i, j = i+1, j-1 {
txList[i], txList[j] = txList[j], txList[i]
}
return txList, err
}