github.com/theQRL/go-zond@v0.1.1/rlp/rlpgen/testdata/uint256.out.txt (about) 1 package test 2 3 import "github.com/theQRL/go-zond/rlp" 4 import "github.com/holiman/uint256" 5 import "io" 6 7 func (obj *Test) EncodeRLP(_w io.Writer) error { 8 w := rlp.NewEncoderBuffer(_w) 9 _tmp0 := w.List() 10 if obj.Int == nil { 11 w.Write(rlp.EmptyString) 12 } else { 13 w.WriteUint256(obj.Int) 14 } 15 w.WriteUint256(&obj.IntNoPtr) 16 w.ListEnd(_tmp0) 17 return w.Flush() 18 } 19 20 func (obj *Test) DecodeRLP(dec *rlp.Stream) error { 21 var _tmp0 Test 22 { 23 if _, err := dec.List(); err != nil { 24 return err 25 } 26 // Int: 27 var _tmp1 uint256.Int 28 if err := dec.ReadUint256(&_tmp1); err != nil { 29 return err 30 } 31 _tmp0.Int = &_tmp1 32 // IntNoPtr: 33 var _tmp2 uint256.Int 34 if err := dec.ReadUint256(&_tmp2); err != nil { 35 return err 36 } 37 _tmp0.IntNoPtr = _tmp2 38 if err := dec.ListEnd(); err != nil { 39 return err 40 } 41 } 42 *obj = _tmp0 43 return nil 44 }