当我运行$bitcoin-cli getblockchaininfo
它显示我:
{
"chain": "main",
"blocks": 20204,
"headers": 563653,
....
}
但是如果一个block是通过他的header来标识的,那么headers和block的个数一定是一样的,我没看懂?
当我运行$bitcoin-cli getblockchaininfo
它显示我:
{
"chain": "main",
"blocks": 20204,
"headers": 563653,
....
}
但是如果一个block是通过他的header来标识的,那么headers和block的个数一定是一样的,我没看懂?
请参阅比特币 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
的高度,是最高验证块头的高度(两者都减一,因为计数从零开始)。单独验证标头不需要整个块。