Bitcoin Forum
May 08, 2024, 09:47:44 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoind api listsinceblock  (Read 3148 times)
mav (OP)
Full Member
***
Offline Offline

Activity: 169
Merit: 107


View Profile
April 05, 2012, 07: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.
1715204864
Hero Member
*
Offline Offline

Posts: 1715204864

View Profile Personal Message (Offline)

Ignore
1715204864
Reply with quote  #2

1715204864
Report to moderator
1715204864
Hero Member
*
Offline Offline

Posts: 1715204864

View Profile Personal Message (Offline)

Ignore
1715204864
Reply with quote  #2

1715204864
Report to moderator
1715204864
Hero Member
*
Offline Offline

Posts: 1715204864

View Profile Personal Message (Offline)

Ignore
1715204864
Reply with quote  #2

1715204864
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715204864
Hero Member
*
Offline Offline

Posts: 1715204864

View Profile Personal Message (Offline)

Ignore
1715204864
Reply with quote  #2

1715204864
Report to moderator
1715204864
Hero Member
*
Offline Offline

Posts: 1715204864

View Profile Personal Message (Offline)

Ignore
1715204864
Reply with quote  #2

1715204864
Report to moderator
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
April 05, 2012, 12:20:12 PM
 #2

Use getblockhash <height> to get the hash of the <height>th number in the main chain.

I do Bitcoin stuff.
mav (OP)
Full Member
***
Offline Offline

Activity: 169
Merit: 107


View Profile
April 05, 2012, 08:46:09 PM
 #3

Use getblockhash <height> to get the hash of the <height>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.
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!