forked from cerc-io/laconicd-deprecated
fix: Extra data empty response (#381)
This commit is contained in:
parent
63aa0de1e8
commit
c4aa8fafab
@ -168,7 +168,7 @@ func FormatBlock(
|
|||||||
"miner": validatorAddr,
|
"miner": validatorAddr,
|
||||||
"mixHash": common.Hash{},
|
"mixHash": common.Hash{},
|
||||||
"difficulty": (*hexutil.Big)(big.NewInt(0)),
|
"difficulty": (*hexutil.Big)(big.NewInt(0)),
|
||||||
"extraData": "",
|
"extraData": "0x",
|
||||||
"size": hexutil.Uint64(size),
|
"size": hexutil.Uint64(size),
|
||||||
"gasLimit": hexutil.Uint64(gasLimit), // Static gas limit
|
"gasLimit": hexutil.Uint64(gasLimit), // Static gas limit
|
||||||
"gasUsed": (*hexutil.Big)(gasUsed),
|
"gasUsed": (*hexutil.Big)(gasUsed),
|
||||||
|
@ -909,6 +909,6 @@ func TestEth_GetBlockByNumber(t *testing.T) {
|
|||||||
block := make(map[string]interface{})
|
block := make(map[string]interface{})
|
||||||
err := json.Unmarshal(rpcRes.Result, &block)
|
err := json.Unmarshal(rpcRes.Result, &block)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Equal(t, "0x0", block["extraData"].(string))
|
require.Equal(t, "0x", block["extraData"].(string))
|
||||||
require.Equal(t, []interface{}{}, block["uncles"].([]interface{}))
|
require.Equal(t, []interface{}{}, block["uncles"].([]interface{}))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user