erigon-pulse/cmd/rpcdaemon/rpcdaemontest
Kian 72c01b2d88
Fix getBlockTransactionCount returning null (#6793)
So... for blocks that don't exist, the eth_getBlockTransactionCount RPCs
should return `null`. Erigon does this correctly right now and this is
covered by the unit test in
[rpcdaemon/commands/corner_cases_support_test.go](https://github.com/ledgerwatch/erigon/blob/devel/cmd/rpcdaemon/commands/corner_cases_support_test.go).

But, for blocks that don't have any transactions, like
[703696](https://etherscan.io/block/703696), the RPC also returns
`null`.

I've changed this to correctly return `0` and have added 2 new tests to
handle it. (I had to add another block to the test chain in
rpcdaemon/rpcdaemontest/test_util.go and had to fix a few other tests
that broke as a result.)

Resolves #6775
2023-02-07 18:32:42 +07:00
..
test_util.go Fix getBlockTransactionCount returning null (#6793) 2023-02-07 18:32:42 +07:00