mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-10 14:03:46 +00:00
* merge geth v1.10.15 * fix: Removed FastSync from cli server * fix: TestHeadersRLPStorage * Added t.skip(ETH2 in bor) * fix: flow in create consensus engine * bumped version * Fix typo * increase block time * remove file * bumped version * merge gethv1.10.17 * bumped version * fix failing tests * Bump Go version to v1.18 (#368) * Bump Go version to v1.18.1 * Build using netgo tag This will create a static build using Go native networking stack. Checked and it works stable for all archs and distros. * Fix meta * Bump version * Meta as stable Co-authored-by: Shivam Sharma <shivam691999@gmail.com> Co-authored-by: Manav Darji <manavdarji.india@gmail.com> Co-authored-by: Sandeep Sreenath <sandeep.sreenath@gmail.com> Co-authored-by: Victor Castell <victor@victorcastell.com>
49 lines
877 B
Text
49 lines
877 B
Text
package test
|
|
|
|
import "github.com/ethereum/go-ethereum/rlp"
|
|
import "io"
|
|
|
|
func (obj *Test) EncodeRLP(_w io.Writer) error {
|
|
w := rlp.NewEncoderBuffer(_w)
|
|
_tmp0 := w.List()
|
|
if obj.Int == nil {
|
|
w.Write(rlp.EmptyString)
|
|
} else {
|
|
if obj.Int.Sign() == -1 {
|
|
return rlp.ErrNegativeBigInt
|
|
}
|
|
w.WriteBigInt(obj.Int)
|
|
}
|
|
if obj.IntNoPtr.Sign() == -1 {
|
|
return rlp.ErrNegativeBigInt
|
|
}
|
|
w.WriteBigInt(&obj.IntNoPtr)
|
|
w.ListEnd(_tmp0)
|
|
return w.Flush()
|
|
}
|
|
|
|
func (obj *Test) DecodeRLP(dec *rlp.Stream) error {
|
|
var _tmp0 Test
|
|
{
|
|
if _, err := dec.List(); err != nil {
|
|
return err
|
|
}
|
|
// Int:
|
|
_tmp1, err := dec.BigInt()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_tmp0.Int = _tmp1
|
|
// IntNoPtr:
|
|
_tmp2, err := dec.BigInt()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_tmp0.IntNoPtr = (*_tmp2)
|
|
if err := dec.ListEnd(); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
*obj = _tmp0
|
|
return nil
|
|
}
|