GetBlockCount/获取区块数量
getblockcount
调用返回本地最优链中的区块数量。
参数
无
返回值
getblockcount
调用返回一个整数值,表示本地最优链中的区块数量。
示例代码
下面的命令返回区块数量:
~$ bitcoin-cli -testnet getblockcount
输出结果如下:
315280
在线工具推荐: Three.js AI纹理开发包 - YOLO合成数据生成器 - GLTF/GLB在线编辑 - 3D模型格式在线转换 - 可编程3D场景编辑器
getblockcount
调用返回本地最优链中的区块数量。
无
getblockcount
调用返回一个整数值,表示本地最优链中的区块数量。
下面的命令返回区块数量:
~$ bitcoin-cli -testnet getblockcount
输出结果如下:
315280