tests: update tests/testdata to v9.0.4 (london) (#23279)
This commit is contained in:
committed by
GitHub
parent
5c13012b56
commit
fb8ea5993f
@ -33,7 +33,7 @@ func (b btHeader) MarshalJSON() ([]byte, error) {
|
||||
GasLimit math.HexOrDecimal64
|
||||
GasUsed math.HexOrDecimal64
|
||||
Timestamp math.HexOrDecimal64
|
||||
BaseFee *math.HexOrDecimal256
|
||||
BaseFeePerGas *math.HexOrDecimal256
|
||||
}
|
||||
var enc btHeader
|
||||
enc.Bloom = b.Bloom
|
||||
@ -52,7 +52,7 @@ func (b btHeader) MarshalJSON() ([]byte, error) {
|
||||
enc.GasLimit = math.HexOrDecimal64(b.GasLimit)
|
||||
enc.GasUsed = math.HexOrDecimal64(b.GasUsed)
|
||||
enc.Timestamp = math.HexOrDecimal64(b.Timestamp)
|
||||
enc.BaseFee = (*math.HexOrDecimal256)(b.BaseFee)
|
||||
enc.BaseFeePerGas = (*math.HexOrDecimal256)(b.BaseFeePerGas)
|
||||
return json.Marshal(&enc)
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ func (b *btHeader) UnmarshalJSON(input []byte) error {
|
||||
GasLimit *math.HexOrDecimal64
|
||||
GasUsed *math.HexOrDecimal64
|
||||
Timestamp *math.HexOrDecimal64
|
||||
BaseFee *math.HexOrDecimal256
|
||||
BaseFeePerGas *math.HexOrDecimal256
|
||||
}
|
||||
var dec btHeader
|
||||
if err := json.Unmarshal(input, &dec); err != nil {
|
||||
@ -129,8 +129,8 @@ func (b *btHeader) UnmarshalJSON(input []byte) error {
|
||||
if dec.Timestamp != nil {
|
||||
b.Timestamp = uint64(*dec.Timestamp)
|
||||
}
|
||||
if dec.BaseFee != nil {
|
||||
b.BaseFee = (*big.Int)(dec.BaseFee)
|
||||
if dec.BaseFeePerGas != nil {
|
||||
b.BaseFeePerGas = (*big.Int)(dec.BaseFeePerGas)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user