Author

Topic: How determine which block contains this transaction by txid? (Read 1399 times)

sr. member
Activity: 350
Merit: 252
probiwon.com
The number of confirmations tells you which block a transaction is in:
0 confirmations: not in a block yet.
1 confirmation: in block number "getblockcount" block.

bitcoin CLI don't have function for view block hash by count number

Quote
2 : getblockcount-1
 ... etc.

Note that if there is a block chain reorganization which block the transaction is in can change (as can the number of confirmations).

This has already happened?

My dream is somehow to get the checked generator of random numbers based on the bitcoin network. I want use sha256(block hash + txid) for this or something like
legendary
Activity: 1652
Merit: 2216
Chief Scientist
The number of confirmations tells you which block a transaction is in:
0 confirmations: not in a block yet.
1 confirmation: in block number "getblockcount" block.
2 : getblockcount-1
 ... etc.

Note that if there is a block chain reorganization which block the transaction is in can change (as can the number of confirmations).


sr. member
Activity: 350
Merit: 252
probiwon.com
How I can determine which block contains this transaction (by txid) from CLI?

Is it possible to add a field "block hash" and "block num" into listtransactions output?
Jump to: