简体   繁体   English

从区块零获取公共地址列表

[英]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?如果我下载了本地区块链,是否可以使用 bitcoin-core rpc 命令查询区块? 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 .您可以使用两个顺序命令 - getblockhashgetblock

  • 1st, getblockhash, take block height, and returns hash of the block on specific height in the current main chain. 1、getblockhash,取区块高度,返回当前主链特定高度区块的hash。
  • 2nd take hash and returns block.第二次取 hash 并返回块。

From linux command line to get block #10000, you can run:从 linux 命令行获取块 #10000,您可以运行:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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