test: support debug_getRaw* RPCs#257
Conversation
debug_getRaw* RPCs
StephenButtolph
left a comment
There was a problem hiding this comment.
Related comment from a prior PR: #154 (comment)
Addressed. |
alarso16
left a comment
There was a problem hiding this comment.
Seems ok, more test coverage can't be bad
4dda5c0 to
33aa6fa
Compare
33aa6fa to
7260f32
Compare
|
Note that #280 did introduce another behavior change -- |
powerslider
left a comment
There was a problem hiding this comment.
LGTM! I just created this PR with some more test cases for TestGetReceipts if you want to optionally enhance the test coverage.
In `TestGetReceipts` - new entries in the test table covering previously untested lookup paths: - `debug_getRawReceipts` (and `eth_getBlockReceipts`) by explicit block number for on-disk, settled, and unsettled blocks - previously only tested by hash. - `debug_getRawReceipts` (and `eth_getBlockReceipts`) for `SafeBlockNumber` and `FinalizedBlockNumber` - previously only `LatestBlockNumber` was covered. Signed-off-by: Tsvetan Dimitrov (tsvetan.dimitrov@avalabs.org)
| want: hexutil.Bytes(marshaled), | ||
| }, | ||
| { | ||
| method: "debug_getRawTransaction", |
There was a problem hiding this comment.
What's the difference between this call and the one above?? To be clear, out of curiosity - these seem like the same API but with different names
There was a problem hiding this comment.
Geth weirdness I think. eth_getRawTransactionByHash is an undocumented API while debug_getRawTransaction is documented, but would only be available here when EnableDBInspecting is enabled.
They both end up calling GetTransaction -> rawdb.ReadTransaction. 🤷
|
Superseded by ava-labs/avalanchego#5284. |
This PR adds test coverage for the remaining
debug_getRaw*RPC methods, now thatBlockByNumberOrHashandGetReceiptshave been implemented. I also added coverage fordebug_printBlockas it seems this was mistakenly added to the list without being tested.