all: regenerate codecs with gencodec commit 90983d99de (#15830)
Fixes #15777 because null is now allowed for hexutil.Bytes.
This commit is contained in:
committed by
Péter Szilágyi
parent
5c2f1e0014
commit
9d06026c19
@ -66,7 +66,7 @@ func (b *btHeader) UnmarshalJSON(input []byte) error {
|
||||
StateRoot *common.Hash
|
||||
TransactionsTrie *common.Hash
|
||||
UncleHash *common.Hash
|
||||
ExtraData hexutil.Bytes
|
||||
ExtraData *hexutil.Bytes
|
||||
Difficulty *math.HexOrDecimal256
|
||||
GasLimit *math.HexOrDecimal64
|
||||
GasUsed *math.HexOrDecimal64
|
||||
@ -110,7 +110,7 @@ func (b *btHeader) UnmarshalJSON(input []byte) error {
|
||||
b.UncleHash = *dec.UncleHash
|
||||
}
|
||||
if dec.ExtraData != nil {
|
||||
b.ExtraData = dec.ExtraData
|
||||
b.ExtraData = *dec.ExtraData
|
||||
}
|
||||
if dec.Difficulty != nil {
|
||||
b.Difficulty = (*big.Int)(dec.Difficulty)
|
||||
|
@ -46,7 +46,7 @@ func (s *stTransaction) UnmarshalJSON(input []byte) error {
|
||||
Data []string `json:"data"`
|
||||
GasLimit []math.HexOrDecimal64 `json:"gasLimit"`
|
||||
Value []string `json:"value"`
|
||||
PrivateKey hexutil.Bytes `json:"secretKey"`
|
||||
PrivateKey *hexutil.Bytes `json:"secretKey"`
|
||||
}
|
||||
var dec stTransaction
|
||||
if err := json.Unmarshal(input, &dec); err != nil {
|
||||
@ -74,7 +74,7 @@ func (s *stTransaction) UnmarshalJSON(input []byte) error {
|
||||
s.Value = dec.Value
|
||||
}
|
||||
if dec.PrivateKey != nil {
|
||||
s.PrivateKey = dec.PrivateKey
|
||||
s.PrivateKey = *dec.PrivateKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ func (t ttTransaction) MarshalJSON() ([]byte, error) {
|
||||
|
||||
func (t *ttTransaction) UnmarshalJSON(input []byte) error {
|
||||
type ttTransaction struct {
|
||||
Data hexutil.Bytes `gencodec:"required"`
|
||||
Data *hexutil.Bytes `gencodec:"required"`
|
||||
GasLimit *math.HexOrDecimal64 `gencodec:"required"`
|
||||
GasPrice *math.HexOrDecimal256 `gencodec:"required"`
|
||||
Nonce *math.HexOrDecimal64 `gencodec:"required"`
|
||||
@ -58,7 +58,7 @@ func (t *ttTransaction) UnmarshalJSON(input []byte) error {
|
||||
if dec.Data == nil {
|
||||
return errors.New("missing required field 'data' for ttTransaction")
|
||||
}
|
||||
t.Data = dec.Data
|
||||
t.Data = *dec.Data
|
||||
if dec.GasLimit == nil {
|
||||
return errors.New("missing required field 'gasLimit' for ttTransaction")
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ func (v *vmExec) UnmarshalJSON(input []byte) error {
|
||||
Address *common.UnprefixedAddress `json:"address" gencodec:"required"`
|
||||
Caller *common.UnprefixedAddress `json:"caller" gencodec:"required"`
|
||||
Origin *common.UnprefixedAddress `json:"origin" gencodec:"required"`
|
||||
Code hexutil.Bytes `json:"code" gencodec:"required"`
|
||||
Data hexutil.Bytes `json:"data" gencodec:"required"`
|
||||
Code *hexutil.Bytes `json:"code" gencodec:"required"`
|
||||
Data *hexutil.Bytes `json:"data" gencodec:"required"`
|
||||
Value *math.HexOrDecimal256 `json:"value" gencodec:"required"`
|
||||
GasLimit *math.HexOrDecimal64 `json:"gas" gencodec:"required"`
|
||||
GasPrice *math.HexOrDecimal256 `json:"gasPrice" gencodec:"required"`
|
||||
@ -67,11 +67,11 @@ func (v *vmExec) UnmarshalJSON(input []byte) error {
|
||||
if dec.Code == nil {
|
||||
return errors.New("missing required field 'code' for vmExec")
|
||||
}
|
||||
v.Code = dec.Code
|
||||
v.Code = *dec.Code
|
||||
if dec.Data == nil {
|
||||
return errors.New("missing required field 'data' for vmExec")
|
||||
}
|
||||
v.Data = dec.Data
|
||||
v.Data = *dec.Data
|
||||
if dec.Value == nil {
|
||||
return errors.New("missing required field 'value' for vmExec")
|
||||
}
|
||||
|
Reference in New Issue
Block a user