add test for debug_getRawReceipts with block hash
This commit is contained in:
parent
52ceaa581f
commit
20648112b5
@ -200,6 +200,22 @@ func TestRewriteRequest(t *testing.T) {
|
|||||||
},
|
},
|
||||||
expected: RewriteNone,
|
expected: RewriteNone,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "debug_getRawReceipts with block hash",
|
||||||
|
args: args{
|
||||||
|
rctx: RewriteContext{latest: hexutil.Uint64(100)},
|
||||||
|
req: &RPCReq{Method: "debug_getRawReceipts", Params: mustMarshalJSON([]string{"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b"})},
|
||||||
|
res: nil,
|
||||||
|
},
|
||||||
|
expected: RewriteNone,
|
||||||
|
check: func(t *testing.T, args args) {
|
||||||
|
var p []string
|
||||||
|
err := json.Unmarshal(args.req.Params, &p)
|
||||||
|
require.Nil(t, err)
|
||||||
|
require.Equal(t, 1, len(p))
|
||||||
|
require.Equal(t, "0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", p[0])
|
||||||
|
},
|
||||||
|
},
|
||||||
/* default block parameter */
|
/* default block parameter */
|
||||||
{
|
{
|
||||||
name: "eth_getCode omit block, should add",
|
name: "eth_getCode omit block, should add",
|
||||||
|
Loading…
Reference in New Issue
Block a user