From 737f056c128e1e9333252a0f2add7c2840ae8631 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Fri, 18 Oct 2019 14:04:19 +0900 Subject: [PATCH] Rebuild types License: MIT Signed-off-by: Jakub Sztandera --- chain/actors/cbor_gen.go | 67 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 4 deletions(-) diff --git a/chain/actors/cbor_gen.go b/chain/actors/cbor_gen.go index d39a81af2..17f6f8128 100644 --- a/chain/actors/cbor_gen.go +++ b/chain/actors/cbor_gen.go @@ -1060,7 +1060,7 @@ func (t *MultiSigActorState) MarshalCBOR(w io.Writer) error { _, err := w.Write(cbg.CborNull) return err } - if _, err := w.Write([]byte{132}); err != nil { + if _, err := w.Write([]byte{135}); err != nil { return err } @@ -1084,6 +1084,21 @@ func (t *MultiSigActorState) MarshalCBOR(w io.Writer) error { return err } + // t.t.InitialBalance (types.BigInt) + if err := t.InitialBalance.MarshalCBOR(w); err != nil { + return err + } + + // t.t.StartingBlock (uint64) + if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, t.StartingBlock)); err != nil { + return err + } + + // t.t.UnlockDuration (uint64) + if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, t.UnlockDuration)); err != nil { + return err + } + // t.t.Transactions ([]actors.MTransaction) if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajArray, uint64(len(t.Transactions)))); err != nil { return err @@ -1107,7 +1122,7 @@ func (t *MultiSigActorState) UnmarshalCBOR(r io.Reader) error { return fmt.Errorf("cbor input should be of type array") } - if extra != 4 { + if extra != 7 { return fmt.Errorf("cbor input had wrong number of fields") } @@ -1157,6 +1172,35 @@ func (t *MultiSigActorState) UnmarshalCBOR(r io.Reader) error { return fmt.Errorf("wrong type for uint64 field") } t.NextTxID = extra + // t.t.InitialBalance (types.BigInt) + + { + + if err := t.InitialBalance.UnmarshalCBOR(br); err != nil { + return err + } + + } + // t.t.StartingBlock (uint64) + + maj, extra, err = cbg.CborReadHeader(br) + if err != nil { + return err + } + if maj != cbg.MajUnsignedInt { + return fmt.Errorf("wrong type for uint64 field") + } + t.StartingBlock = extra + // t.t.UnlockDuration (uint64) + + maj, extra, err = cbg.CborReadHeader(br) + if err != nil { + return err + } + if maj != cbg.MajUnsignedInt { + return fmt.Errorf("wrong type for uint64 field") + } + t.UnlockDuration = extra // t.t.Transactions ([]actors.MTransaction) maj, extra, err = cbg.CborReadHeader(br) @@ -1191,7 +1235,7 @@ func (t *MultiSigConstructorParams) MarshalCBOR(w io.Writer) error { _, err := w.Write(cbg.CborNull) return err } - if _, err := w.Write([]byte{130}); err != nil { + if _, err := w.Write([]byte{131}); err != nil { return err } @@ -1209,6 +1253,11 @@ func (t *MultiSigConstructorParams) MarshalCBOR(w io.Writer) error { if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, t.Required)); err != nil { return err } + + // t.t.UnlockDuration (uint64) + if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, t.UnlockDuration)); err != nil { + return err + } return nil } @@ -1223,7 +1272,7 @@ func (t *MultiSigConstructorParams) UnmarshalCBOR(r io.Reader) error { return fmt.Errorf("cbor input should be of type array") } - if extra != 2 { + if extra != 3 { return fmt.Errorf("cbor input had wrong number of fields") } @@ -1263,6 +1312,16 @@ func (t *MultiSigConstructorParams) UnmarshalCBOR(r io.Reader) error { return fmt.Errorf("wrong type for uint64 field") } t.Required = extra + // t.t.UnlockDuration (uint64) + + maj, extra, err = cbg.CborReadHeader(br) + if err != nil { + return err + } + if maj != cbg.MajUnsignedInt { + return fmt.Errorf("wrong type for uint64 field") + } + t.UnlockDuration = extra return nil }