tx_getBlockTransactionCountByNumber
根据区块号查询区块交易数量。
Parameters
<blcokNumber>
- 区块号,可以是十进制整数、进制字符串或“latest”字符串来表示最新区块。
Returns
<string>
- 十六进制字符串,交易数量。
Example1:正常的请求
- # Request
- curl -X POST --data '{"jsonrpc": "2.0", "namespace":"global", "method":" tx_getBlockTransactionCountByNumber", "params": ["0x2"], "id": 71}'
- # Response
- {
- "id":71,
- "jsonrpc": "2.0",
- "namespace":"global",
- "code": 0,
- "message": "SUCCESS",
- "result": "0xaf5"
- }
Example2:查询的区块不存在
- # Request
- curl -X POST --data '{"jsonrpc": "2.0", "namespace":"global", "method":" tx_getBlockTransactionCountByNumber", "params": ["0x2"], "id": 71}'
- # Response
- {
- "jsonrpc": "2.0",
- "namespace": "global",
- "id": 71,
- "code": -32602,
- "message": "block number 0x2 is out of range, and now latest block number is 0"
- }
当前内容版权归 Hyperchain 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Hyperchain .