Create eth_getBlockTransactionCountByNumber.md#54
Create eth_getBlockTransactionCountByNumber.md#54DockBoss wants to merge 1 commit intoethereum:mainfrom DockBoss:patch-9
Conversation
DockBoss
commented
Aug 12, 2021
- Geth
- OpenEthereum
- Nethermind
- Besu
- Erigon
- [ ] Geth - [ ] OpenEthereum - [ ] Nethermind - [ ] Besu - [ ] Erigon
|
cc @MicahZoltu @timbeiko @marcindsobczak @gnidan @rekmarks @rakitadragan @vorot93 This is a PR for adding edgecases for the proposed method. In particular, an edgecase is defined as any behavior outside of the OpenRPC specification defined in this repository. This needs approval from all 5 clients before it can be merged. This is one method in a slew soon to come. |
| @@ -0,0 +1 @@ | |||
| * If the client has a block equal to the `block_number` parameter it **MUST** return the number of transactions the block conatins, otherwise it **MUST** return null. | |||
There was a problem hiding this comment.
Maybe this is what clients currently do, but it is definitely not what clients should do.
Clients should return a JSON-RPC error if they do not have the block requested. If they do have the requested block, it should always return a number (never null).
In general, the JSON-RPC should be returning errors for error conditions, not returning sentinel values or null for error conditions.