Bitcoin Forum

Bitcoin => Mining => Topic started by: fahhem on April 23, 2011, 05:49:44 AM



Title: Checking block confirmation
Post by: fahhem on April 23, 2011, 05:49:44 AM
Block are generated basically at random so there is a possibility that even if I generate a block, that I might not have been the first to generate that particular block, hence the need for confirmations. However, how can I programmatically check if I generated block number X?


Title: Re: Checking block confirmation
Post by: [Tycho] on April 23, 2011, 07:19:32 AM
Block are generated basically at random so there is a possibility that even if I generate a block, that I might not have been the first to generate that particular block, hence the need for confirmations. However, how can I programmatically check if I generated block number X?
You can compare your hash with the hash of that block in the active block chain.


Title: Re: Checking block confirmation
Post by: fahhem on April 23, 2011, 09:46:23 AM
How would I get the hash for that block? I don't see any RPC methods for that, would I need a modified bitcoind?


Title: Re: Checking block confirmation
Post by: dbitcoin on April 23, 2011, 10:57:15 AM
How would I get the hash for that block? I don't see any RPC methods for that, would I need a modified bitcoind?
yep, search pacthes from jgarzik and build custom bitcoind from sources.