简体   繁体   中英

Getting a list of public addresses from block zero

If I have a local blockchain downloaded, is it possible to use the bitcoin-core rpc commands to query a block? For example the genesis block to get a list of all the public addresses used in that block? If it is possible, which commands do I need to use?

You can use two sequenced command - getblockhash and getblock .

  • 1st, getblockhash, take block height, and returns hash of the block on specific height in the current main chain.
  • 2nd take hash and returns block.

From linux command line to get block #10000, you can run:

$ bitcoin-cli getblock `bitcoin-cli getblockhash 100000`

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM