erigon-pulse/cmd/rpcdaemon/commands
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
..
contracts move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
admin_api.go Erigon2 upgrade 2 prototype (#4341) 2022-06-10 16:18:43 +01:00
bor_api.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
bor_helper.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
bor_snapshot.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
call_traces_test.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
corner_cases_support_test.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
daemon.go Eth call limits (#6523) 2023-01-07 21:16:43 +00:00
db_api_deprecated.go rename (#1978) 2021-05-20 19:25:53 +01:00
debug_api_test.go Fix getBlockTransactionCount returning null (#6793) 2023-02-07 18:32:42 +07:00
debug_api.go e3: eth_getModifiedAccountsByNumber (#6733) 2023-01-29 10:10:39 +07:00
engine_api_test.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
engine_api.go Validate params of GetPayloadBodiesByHash and ByRange (#6785) 2023-02-06 18:38:45 +01:00
erigon_api.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
erigon_block.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
erigon_cache_check.go cache state check (#5844) 2022-11-07 13:04:31 +00:00
erigon_cumulative_chain_traffic.go Cumulative index stage (#3314) 2022-01-27 10:49:03 +00:00
erigon_nodeInfo.go Add NodeInfo implementation (#3046) 2021-11-30 22:42:12 +00:00
erigon_receipts_test.go Fix getBlockTransactionCount returning null (#6793) 2023-02-07 18:32:42 +07:00
erigon_receipts.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
erigon_system.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
error_messages.go add --datadir parameter to integration, snapshot generator, header downloader (#1749) 2021-04-19 14:25:26 +07:00
eth_accounts.go e3: simplify history reader (#6659) 2023-01-22 16:42:24 +07:00
eth_api_test.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
eth_api.go add eth_getFilterLogs, fix filter subscription ids (#6514) 2023-02-06 10:18:10 +07:00
eth_block_test.go Fix getBlockTransactionCount returning null (#6793) 2023-02-07 18:32:42 +07:00
eth_block.go Fix getBlockTransactionCount returning null (#6793) 2023-02-07 18:32:42 +07:00
eth_call_test.go e3: simplify history reader (#6659) 2023-01-22 16:42:24 +07:00
eth_call.go e3: ots underflow fixes (#6721) 2023-01-27 14:41:11 +07:00
eth_callMany_test.go e3: use historyReader constructor in tests (#6677) 2023-01-24 12:43:04 +07:00
eth_callMany.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
eth_deprecated.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
eth_filters_test.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
eth_filters.go add eth_getFilterLogs, fix filter subscription ids (#6514) 2023-02-06 10:18:10 +07:00
eth_mining_test.go Eth call limits (#6523) 2023-01-07 21:16:43 +00:00
eth_mining.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
eth_receipts.go rpc: move receipts length check after bor logic (#6731) 2023-01-28 21:21:57 +00:00
eth_subscribe_test.go e3: fix test 2023-01-23 18:56:20 +07:00
eth_system_test.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
eth_system.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
eth_txs.go Fix retrieving Bor transactions from the pool (#6689) 2023-01-28 21:20:08 +00:00
eth_uncles.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
gen_traces_test.go feat(trace): use specific error string (#6696) 2023-01-26 15:10:51 +01:00
get_chain_config_test.go move kv to erigon-lib (#2467) 2021-07-29 18:53:13 +07:00
net_api.go Erigon2 upgrade 2 prototype (#4341) 2022-06-10 16:18:43 +01:00
otterscan_api.go e3: ots system txn handle 2023-01-27 16:05:09 +07:00
otterscan_block_details.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_contract_creator_test.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_contract_creator.go e3: ots system txn handle 2023-01-27 16:05:09 +07:00
otterscan_default_tracer.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_generic_tracer.go e3: ots system txn handle 2023-01-27 16:05:09 +07:00
otterscan_has_code.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_search_backward_multi_test.go Upstream all Otterscan patches to devel (#5945) 2022-11-03 11:32:15 +07:00
otterscan_search_backward_test.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_search_backward.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_search_forward_multi_test.go Upstream all Otterscan patches to devel (#5945) 2022-11-03 11:32:15 +07:00
otterscan_search_forward_test.go Upstream all Otterscan patches to devel (#5945) 2022-11-03 11:32:15 +07:00
otterscan_search_forward.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_search_multi.go Upstream all Otterscan patches to devel (#5945) 2022-11-03 11:32:15 +07:00
otterscan_search_test.go Upstream all Otterscan patches to devel (#5945) 2022-11-03 11:32:15 +07:00
otterscan_search_trace.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_trace_contract_creator.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_trace_operations.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_trace_touch.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_trace_transaction.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_transaction_by_sender_and_nonce_test.go e3: ots system txn handle 2023-01-27 16:05:09 +07:00
otterscan_transaction_by_sender_and_nonce.go e3: eth_getModifiedAccountsByNumber (#6733) 2023-01-29 10:10:39 +07:00
otterscan_transaction_error.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_types.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
parity_api_test.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
parity_api.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
send_transaction_test.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
send_transaction.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
storage_range.go e3: eth_getModifiedAccountsByNumber (#6733) 2023-01-29 10:10:39 +07:00
trace_adhoc_test.go e3: reverse/limited iterators, stream tooling (#6637) 2023-01-20 18:08:20 +07:00
trace_adhoc.go feat(trace): use specific error string (#6696) 2023-01-26 15:10:51 +01:00
trace_api.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
trace_filtering.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
trace_types.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
tracing.go e3: ots system txn handle 2023-01-27 16:05:09 +07:00
txpool_api_test.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
txpool_api.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
validator_set.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
web3_api.go Erigon2 upgrade 2 prototype (#4341) 2022-06-10 16:18:43 +01:00