Bitcoin Forum
May 20, 2024, 11:44:46 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1]
  Print  
Author Topic: Getting list of all transactions and addresses using a daemon  (Read 1085 times)
williamj2543 (OP)
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500

Get ready for PrimeDice Sig Campaign!


View Profile WWW
August 15, 2014, 01:47:33 AM
 #1

Hey, I am doing some cryptocurrency programming, more specifically I am building a block explorer, and I am wondering how would I list all the latest transactions on the network, and how would I get all addresses with a balance greater than 0 (I am trying to make a rich list). I am not necessarily using bitcoin (I am using other altcoins) but the daemon calls are all the same. How would I do this?

█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
▓▓▓▓▓  BIT-X.comvvvvvvvvvvvvvvi
→ CREATE ACCOUNT 
▓▓▓▓▓
█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
August 15, 2014, 05:13:04 AM
 #2

Ugh.

Start by parsing the block files to quickly generate your database.  Keep it current with -blocknotify.  To see unconfirmed transactions, either interface with a real node using the p2p protocol, or poll the mempool and iterate the list asking for transaction details.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
williamj2543 (OP)
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500

Get ready for PrimeDice Sig Campaign!


View Profile WWW
August 15, 2014, 06:48:53 AM
 #3

Yea I was thinking that I would have to use a database of some sort. I think I'm gonna do a loop to index all of the blocks to get all the txs in the database. I'd have to increase the block height every time it is looped ($a++) sort of thing. Is there any way to get info about an address not in my wallet? My txindex is set to 1.

█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
▓▓▓▓▓  BIT-X.comvvvvvvvvvvvvvvi
→ CREATE ACCOUNT 
▓▓▓▓▓
█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
August 15, 2014, 11:22:43 AM
 #4

Why people like to count funds in pockets they do not own Huh
BitCoinDream
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
August 15, 2014, 12:55:48 PM
 #5

Why people like to count funds in pockets they do not own Huh

Because other people's interest in that data fills up their pocket.

BitCoinDream
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
August 15, 2014, 12:57:55 PM
 #6

Yea I was thinking that I would have to use a database of some sort. I think I'm gonna do a loop to index all of the blocks to get all the txs in the database. I'd have to increase the block height every time it is looped ($a++) sort of thing. Is there any way to get info about an address not in my wallet? My txindex is set to 1.

I think the best bet is to use a flat file, but managing that would require a lot of coding.

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!