-1

当我运行$bitcoin-cli getblockchaininfo它显示我:

{
  "chain": "main",
  "blocks": 20204,
  "headers": 563653,
  ....
}

但是如果一个block是通过他的header来标识的,那么headers和block的个数一定是一样的,我没看懂?

4

1 回答 1

2

请参阅比特币 RPC 文档 - getblockchaininfo

"blocks": xxxxxx,             (numeric) the current number of blocks processed in the server
"headers": xxxxxx,            (numeric) the current number of headers we have validated

blocks是最高下载和验证块headers的高度,是最高验证块头的高度(两者都减一,因为计数从零开始)。单独验证标头不需要整个块。

于 2019-02-18T21:47:10.627 回答