hyperledger / besu-docs

Documentation for Hyperledger Besu enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://besu.hyperledger.org/
Apache License 2.0
64 stars 115 forks source link

Add API return information #441

Closed bgravenorst closed 3 years ago

bgravenorst commented 4 years ago

Feedback:

"while going through the Besu APIs to understand how preventing empty block creation for IBFT2 could affect existing applications, I have noticed that the doc for the API call eth_getBlockTransactionCountByHash does not mention how the call behaves in the case that no block matching the hash provided as parameter to the call has been received."

timbeiko commented 4 years ago

@bgravenorst the result is just null.

Using the example from the docs on a syncing node, I just get the following:

timbeiko@Tims-MBP ~ % curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"],"id":53}' http://127.0.0.1:8545
{
  "jsonrpc" : "2.0",
  "id" : 53,
  "result" : null
}%

Not sure it is something worth documenting. WDYT?