getBlockCommitment RPC 方法
返回特定区块的承诺信息
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getBlockCommitment",> "params": [> 5> ]> }> '
params
u64required
区块编号,由 Slot 标识。
result
Response
{"jsonrpc": "2.0","result": {"commitment": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 10, 32],"totalStake": 42},"id": 1}
object
结果字段将是一个包含以下内容的 JSON 对象:
Is this page helpful?