getBlockHeight RPC 方法
返回节点的当前区块高度
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getBlockHeight",> "params": [> {> "commitment": "finalized"> }> ]> }> '
params
objectoptional
配置对象
result
Response
{"jsonrpc": "2.0","result": 1233,"id": 1}
u64
当前区块高度。
Is this page helpful?