tx_getBlockTransactionCountByHash
根据区块哈希查询区块交易数量。
Parameters
<string>
- 32字节的十六进制字符串,区块的哈希值。
Returns
<string>
- 十六进制字符串,交易数量。
Example1:正常的请求
- # Request
- curl -X POST --data '{"jsonrpc": "2.0", "namespace":"global", "method":"tx_getBlockTransactionCountByHash", "params": ["0x7a87bd1fb51a86763e9791eab1d5ecca7f004bea1cfcc426113b4625d267f699"], "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_getBlockTransactionCountByHash", "params": ["0x7a87bd1fb51a86763e9791eab1d5ecca7f004bea1cfcc426113b4625d267f699"], "id": 71}'
- # Response
- {
- "jsonrpc": "2.0",
- "namespace": "global",
- "id": 71,
- "code": -32001,
- "message":"Not found block 0x7a87bd1fb51a86763e9791eab1d5ecca7f004bea1cfcc426113b4625d267f699"
- }
当前内容版权归 Hyperchain 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Hyperchain .