Author

Topic: bitcoind api listsinceblock (Read 3170 times)

mav
full member
Activity: 169
Merit: 107
April 05, 2012, 03:46:09 PM
#3
Use getblockhash to get the hash of the th number in the main chain.

Thanks a lot, this solution worked well. I will use bitcoind help in the future as it's more useful and up-to-date than the link I posted.
legendary
Activity: 1072
Merit: 1181
April 05, 2012, 07:20:12 AM
#2
Use getblockhash to get the hash of the th number in the main chain.
mav
full member
Activity: 169
Merit: 107
April 05, 2012, 02:10:26 AM
#1
I have a question about the call to listsinceblock when using bitcoind api

According to the spec the call takes an optional value for 'blockid' - spec at https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

I have tested and confirmed that the call works as I thought it would by going to blockexplorer and copying the hash of the latest block as the 'blockid' value

eg this works

bitcoind listsinceblock 00000000000005a11a8149e365aa5d2e7a1cd1ab9ad3ae1aa37f8502845cd285

This shows me transactions from my wallet that have happened since block 174365 (which has the hash above)

What I am unsure of is how to get the hash value using bitcoind api calls.

The use I intended for this call was as a way to get the most recent transactions only. I planned to use the call to getblockcount which would give me the most recent block number, and then use that number to get the hash of the most recent block. I could use that hash in listsinceblock to give me a list of all the most recent transactions in my wallet.

In practice I will use listtransactions which will give me the required set of transactions for the specified account. However, I will post this here anyway because I am curious about how the call to listsinceblock is intended to work. Any help is appreciated.
Jump to: