mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
fix: generated rlp decoders
This commit is contained in:
parent
045f53e67a
commit
9a0784d68a
3 changed files with 4 additions and 123 deletions
|
|
@ -5,11 +5,8 @@
|
|||
|
||||
package types
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
)
|
||||
import "github.com/ethereum/go-ethereum/rlp"
|
||||
import "io"
|
||||
|
||||
func (obj *StateAccount) EncodeRLP(_w io.Writer) error {
|
||||
w := rlp.NewEncoderBuffer(_w)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
package types
|
||||
|
||||
import "github.com/ethereum/go-ethereum/common"
|
||||
import "github.com/ethereum/go-ethereum/rlp"
|
||||
import "io"
|
||||
|
||||
|
|
@ -79,115 +78,3 @@ func (obj *Header) EncodeRLP(_w io.Writer) error {
|
|||
w.ListEnd(_tmp0)
|
||||
return w.Flush()
|
||||
}
|
||||
|
||||
func (obj *Header) DecodeRLP(dec *rlp.Stream) error {
|
||||
var _tmp0 Header
|
||||
{
|
||||
if _, err := dec.List(); err != nil {
|
||||
return err
|
||||
}
|
||||
// ParentHash:
|
||||
var _tmp1 common.Hash
|
||||
if err := dec.ReadBytes(_tmp1[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.ParentHash = _tmp1
|
||||
// UncleHash:
|
||||
var _tmp2 common.Hash
|
||||
if err := dec.ReadBytes(_tmp2[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.UncleHash = _tmp2
|
||||
// Coinbase:
|
||||
var _tmp3 common.Address
|
||||
if err := dec.ReadBytes(_tmp3[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.Coinbase = _tmp3
|
||||
// Root:
|
||||
var _tmp4 common.Hash
|
||||
if err := dec.ReadBytes(_tmp4[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.Root = _tmp4
|
||||
// TxHash:
|
||||
var _tmp5 common.Hash
|
||||
if err := dec.ReadBytes(_tmp5[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.TxHash = _tmp5
|
||||
// ReceiptHash:
|
||||
var _tmp6 common.Hash
|
||||
if err := dec.ReadBytes(_tmp6[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.ReceiptHash = _tmp6
|
||||
// Bloom:
|
||||
var _tmp7 Bloom
|
||||
if err := dec.ReadBytes(_tmp7[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.Bloom = _tmp7
|
||||
// Difficulty:
|
||||
_tmp8, err := dec.BigInt()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.Difficulty = _tmp8
|
||||
// Number:
|
||||
_tmp9, err := dec.BigInt()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.Number = _tmp9
|
||||
// GasLimit:
|
||||
_tmp10, err := dec.Uint64()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.GasLimit = _tmp10
|
||||
// GasUsed:
|
||||
_tmp11, err := dec.Uint64()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.GasUsed = _tmp11
|
||||
// Time:
|
||||
_tmp12, err := dec.Uint64()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.Time = _tmp12
|
||||
// Extra:
|
||||
_tmp13, err := dec.Bytes()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.Extra = _tmp13
|
||||
// MixDigest:
|
||||
var _tmp14 common.Hash
|
||||
if err := dec.ReadBytes(_tmp14[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.MixDigest = _tmp14
|
||||
// Nonce:
|
||||
var _tmp15 BlockNonce
|
||||
if err := dec.ReadBytes(_tmp15[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.Nonce = _tmp15
|
||||
// BaseFee:
|
||||
if dec.MoreDataInList() {
|
||||
_tmp16, err := dec.BigInt()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_tmp0.BaseFee = _tmp16
|
||||
}
|
||||
if err := dec.ListEnd(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
*obj = _tmp0
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,8 @@
|
|||
|
||||
package types
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
)
|
||||
import "github.com/ethereum/go-ethereum/rlp"
|
||||
import "io"
|
||||
|
||||
func (obj *rlpLog) EncodeRLP(_w io.Writer) error {
|
||||
w := rlp.NewEncoderBuffer(_w)
|
||||
|
|
|
|||
Loading…
Reference in a new issue