filefilego / filefilego

Decentralized Data Sharing Network - A Peer-to-peer, censorship-resistant, and a privacy-focused data sharing network
https://filefilego.com/
GNU Lesser General Public License v3.0
69 stars 9 forks source link

Transactions by address pagination should be sorted from newest to oldest #121

Closed filefilegoadmin closed 1 year ago

filefilegoadmin commented 1 year ago

The pagination should include the recent transactions first. goleveldb supports seeking, so a quick solution is to use an iterator, jumpt to the last, and start reading using .Prev()

Important: using the .Last() will skip the last since we start a for loop with for iter.Prev(), so inside the loop go forward one element if the index is zero

filefilegoadmin commented 1 year ago

Done