Bitcoin Forum
June 14, 2024, 07:44:49 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Re: listtransactions output is not in order  (Read 49 times)
arttu pakarinen (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
September 09, 2021, 11:29:36 AM
Last edit: September 09, 2021, 12:32:07 PM by arttu pakarinen
 #1

Just started doing work with bitcoin core and i want list of newest transactions first.

I though listtransactions would do it but no, it always returns the list starting from the oldest.

I COULD iterate through all of the transactions but its not optimal.

Shouldnt this function have a simple order ASC / DESC parameter?
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5829


not your keys, not your coins!


View Profile WWW
September 10, 2021, 12:47:08 PM
 #2

Just started doing work with bitcoin core and i want list of newest transactions first.

I though listtransactions would do it but no, it always returns the list starting from the oldest.

I COULD iterate through all of the transactions but its not optimal.

Shouldnt this function have a simple order ASC / DESC parameter?
I would argue if you're writing a program that interfaces with Bitcoin Core (even if it's just a shell script) you could just do the ordering in there, after parsing the call's output.
We like to keep Bitcoin Core clean and lean and not add too many unnecessary features. Less code = less potential bugs, easier to audit.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!