mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
fix block overrides in gethclient
This commit is contained in:
parent
fd0f626f67
commit
1e7b497fb3
2 changed files with 5 additions and 5 deletions
|
|
@ -313,9 +313,9 @@ func (o BlockOverrides) MarshalJSON() ([]byte, error) {
|
|||
Difficulty *hexutil.Big `json:"difficulty,omitempty"`
|
||||
Time hexutil.Uint64 `json:"time,omitempty"`
|
||||
GasLimit hexutil.Uint64 `json:"gasLimit,omitempty"`
|
||||
Coinbase *common.Address `json:"coinbase,omitempty"`
|
||||
Random *common.Hash `json:"random,omitempty"`
|
||||
BaseFee *hexutil.Big `json:"baseFee,omitempty"`
|
||||
Coinbase *common.Address `json:"feeRecipient,omitempty"`
|
||||
Random *common.Hash `json:"prevRandao,omitempty"`
|
||||
BaseFee *hexutil.Big `json:"baseFeePerGas,omitempty"`
|
||||
}
|
||||
|
||||
output := override{
|
||||
|
|
|
|||
|
|
@ -510,7 +510,7 @@ func TestBlockOverridesMarshal(t *testing.T) {
|
|||
bo: BlockOverrides{
|
||||
Coinbase: common.HexToAddress("0x1111111111111111111111111111111111111111"),
|
||||
},
|
||||
want: `{"coinbase":"0x1111111111111111111111111111111111111111"}`,
|
||||
want: `{"feeRecipient":"0x1111111111111111111111111111111111111111"}`,
|
||||
},
|
||||
{
|
||||
bo: BlockOverrides{
|
||||
|
|
@ -520,7 +520,7 @@ func TestBlockOverridesMarshal(t *testing.T) {
|
|||
GasLimit: 4,
|
||||
BaseFee: big.NewInt(5),
|
||||
},
|
||||
want: `{"number":"0x1","difficulty":"0x2","time":"0x3","gasLimit":"0x4","baseFee":"0x5"}`,
|
||||
want: `{"number":"0x1","difficulty":"0x2","time":"0x3","gasLimit":"0x4","baseFeePerGas":"0x5"}`,
|
||||
},
|
||||
} {
|
||||
marshalled, err := json.Marshal(&tt.bo)
|
||||
|
|
|
|||
Loading…
Reference in a new issue