Bitcoin Forum
May 12, 2024, 02:50:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How determine which block contains this transaction by txid?  (Read 1400 times)
bitcoinex (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 252


probiwon.com


View Profile WWW
January 23, 2011, 11:48:13 AM
 #1

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?

New bitcoin lottery: probiwon.com
- Moжeт, ты eщё и в Heвидимyю Pyкy Pынкa вepyeшь? - Зaчeм жe вepoвaть в тo, чтo мoжнo нaблюдaть нeпocpeдcтвeннo?
1715482226
Hero Member
*
Offline Offline

Posts: 1715482226

View Profile Personal Message (Offline)

Ignore
1715482226
Reply with quote  #2

1715482226
Report to moderator
1715482226
Hero Member
*
Offline Offline

Posts: 1715482226

View Profile Personal Message (Offline)

Ignore
1715482226
Reply with quote  #2

1715482226
Report to moderator
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715482226
Hero Member
*
Offline Offline

Posts: 1715482226

View Profile Personal Message (Offline)

Ignore
1715482226
Reply with quote  #2

1715482226
Report to moderator
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
January 23, 2011, 02:05:47 PM
 #2

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).



How often do you get the chance to work on a potentially world-changing project?
bitcoinex (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 252


probiwon.com


View Profile WWW
January 23, 2011, 02:16:42 PM
 #3

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

New bitcoin lottery: probiwon.com
- Moжeт, ты eщё и в Heвидимyю Pyкy Pынкa вepyeшь? - Зaчeм жe вepoвaть в тo, чтo мoжнo нaблюдaть нeпocpeдcтвeннo?
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!