Author

Topic: listunspent: get count of UTXOs rather than details? (Read 308 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
What's the main reason these commands are available in Core?
These commands are really not for the average user. They are for interacting with a bitcoind that's running on a server with a script or from the command line. They're also used for testing.

Would it make sense to add to listunspent extra parameters that show summarized info?
It would not make sense to add that to listunspent. You could add it somewhere else though, like getwalletinfo.
member
Activity: 301
Merit: 74
It's easy if you're the one doing it, but I was looking for something simple for the average user.

I got curious about the total number of Bitcoin users, and thought an own UTXO count poll in the forum could give a rough number.
But if it's complex to check, there will be fewer replies and less accurate data.

What's the main reason these commands are available in Core?
Would it make sense to add to listunspent extra parameters that show summarized info?


staff
Activity: 3458
Merit: 6793
Just writing some code
I don't think that is possible, but you can just pass the output of the listunspent command to a JSON parser and have the JSON parser tell you how many elements are in the array.
member
Activity: 301
Merit: 74
Is there a way to get "listunspent" to return just the total number of matching UTXOs, rather than a detailed array of UTXOs?

Jump to: