make gen
This commit is contained in:
parent
2fa5422581
commit
c6debaadf0
@ -42,7 +42,7 @@ func (t *PaymentInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Channel"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Channel")); err != nil {
|
||||
if _, err := cw.WriteString(string("Channel")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ func (t *PaymentInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Vouchers"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Vouchers")); err != nil {
|
||||
if _, err := cw.WriteString(string("Vouchers")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ func (t *PaymentInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("WaitSentinel"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("WaitSentinel")); err != nil {
|
||||
if _, err := cw.WriteString(string("WaitSentinel")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -163,13 +163,32 @@ func (t *PaymentInfo) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v paych.SignedVoucher
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
b, err := cr.ReadByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if b != cbg.CborNull[0] {
|
||||
if err := cr.UnreadByte(); err != nil {
|
||||
return err
|
||||
}
|
||||
t.Vouchers[i] = new(paych.SignedVoucher)
|
||||
if err := t.Vouchers[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Vouchers[i] pointer: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Vouchers[i] = &v
|
||||
}
|
||||
|
||||
// t.WaitSentinel (cid.Cid) (struct)
|
||||
@ -214,7 +233,7 @@ func (t *SealedRef) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Size"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Size")); err != nil {
|
||||
if _, err := cw.WriteString(string("Size")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -230,7 +249,7 @@ func (t *SealedRef) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Offset"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Offset")); err != nil {
|
||||
if _, err := cw.WriteString(string("Offset")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -246,7 +265,7 @@ func (t *SealedRef) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorID"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("SectorID")); err != nil {
|
||||
if _, err := cw.WriteString(string("SectorID")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -369,7 +388,7 @@ func (t *SealedRefs) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Refs"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Refs")); err != nil {
|
||||
if _, err := cw.WriteString(string("Refs")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -447,13 +466,22 @@ func (t *SealedRefs) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v SealedRef
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
if err := t.Refs[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Refs[i]: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Refs[i] = v
|
||||
}
|
||||
|
||||
default:
|
||||
@ -484,7 +512,7 @@ func (t *SealTicket) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Epoch"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Epoch")); err != nil {
|
||||
if _, err := cw.WriteString(string("Epoch")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -506,7 +534,7 @@ func (t *SealTicket) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Value"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Value")); err != nil {
|
||||
if _, err := cw.WriteString(string("Value")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -639,7 +667,7 @@ func (t *SealSeed) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Epoch"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Epoch")); err != nil {
|
||||
if _, err := cw.WriteString(string("Epoch")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -661,7 +689,7 @@ func (t *SealSeed) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Value"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Value")); err != nil {
|
||||
if _, err := cw.WriteString(string("Value")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -794,7 +822,7 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("DealID"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("DealID")); err != nil {
|
||||
if _, err := cw.WriteString(string("DealID")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -810,7 +838,7 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PublishCid"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("PublishCid")); err != nil {
|
||||
if _, err := cw.WriteString(string("PublishCid")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -832,7 +860,7 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("DealProposal"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("DealProposal")); err != nil {
|
||||
if _, err := cw.WriteString(string("DealProposal")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -848,7 +876,7 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("DealSchedule"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("DealSchedule")); err != nil {
|
||||
if _, err := cw.WriteString(string("DealSchedule")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -864,7 +892,7 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("KeepUnsealed"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("KeepUnsealed")); err != nil {
|
||||
if _, err := cw.WriteString(string("KeepUnsealed")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1027,7 +1055,7 @@ func (t *SectorPiece) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Piece"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Piece")); err != nil {
|
||||
if _, err := cw.WriteString(string("Piece")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1043,7 +1071,7 @@ func (t *SectorPiece) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("DealInfo"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("DealInfo")); err != nil {
|
||||
if _, err := cw.WriteString(string("DealInfo")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1150,7 +1178,7 @@ func (t *DealSchedule) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("EndEpoch"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("EndEpoch")); err != nil {
|
||||
if _, err := cw.WriteString(string("EndEpoch")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1172,7 +1200,7 @@ func (t *DealSchedule) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("StartEpoch"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("StartEpoch")); err != nil {
|
||||
if _, err := cw.WriteString(string("StartEpoch")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -52,9 +52,11 @@ func (t *NetRpcReq) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range t.Cid {
|
||||
if err := cbg.WriteCid(w, v); err != nil {
|
||||
return xerrors.Errorf("failed writing cid field t.Cid: %w", err)
|
||||
|
||||
if err := cbg.WriteCid(cw, v); err != nil {
|
||||
return xerrors.Errorf("failed to write cid field v: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// t.Data ([][]uint8) (slice)
|
||||
@ -151,12 +153,25 @@ func (t *NetRpcReq) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("reading cid field t.Cid failed: %w", err)
|
||||
{
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read cid field t.Cid[i]: %w", err)
|
||||
}
|
||||
|
||||
t.Cid[i] = c
|
||||
|
||||
}
|
||||
}
|
||||
t.Cid[i] = c
|
||||
}
|
||||
|
||||
// t.Data ([][]uint8) (slice)
|
||||
@ -183,6 +198,9 @@ func (t *NetRpcReq) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
maj, extra, err = cr.ReadHeader()
|
||||
if err != nil {
|
||||
@ -350,7 +368,7 @@ func (t *NetRpcErr) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Msg))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Msg)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Msg)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -43,9 +43,11 @@ func (t *Request) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range t.Head {
|
||||
if err := cbg.WriteCid(w, v); err != nil {
|
||||
return xerrors.Errorf("failed writing cid field t.Head: %w", err)
|
||||
|
||||
if err := cbg.WriteCid(cw, v); err != nil {
|
||||
return xerrors.Errorf("failed to write cid field v: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// t.Length (uint64) (uint64)
|
||||
@ -106,12 +108,25 @@ func (t *Request) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("reading cid field t.Head failed: %w", err)
|
||||
{
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read cid field t.Head[i]: %w", err)
|
||||
}
|
||||
|
||||
t.Head[i] = c
|
||||
|
||||
}
|
||||
}
|
||||
t.Head[i] = c
|
||||
}
|
||||
|
||||
// t.Length (uint64) (uint64)
|
||||
@ -173,7 +188,7 @@ func (t *Response) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ErrorMessage))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.ErrorMessage)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.ErrorMessage)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -260,13 +275,32 @@ func (t *Response) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v BSTipSet
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
b, err := cr.ReadByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if b != cbg.CborNull[0] {
|
||||
if err := cr.UnreadByte(); err != nil {
|
||||
return err
|
||||
}
|
||||
t.Chain[i] = new(BSTipSet)
|
||||
if err := t.Chain[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Chain[i] pointer: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Chain[i] = &v
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -317,9 +351,11 @@ func (t *CompactedMessages) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range v {
|
||||
if err := cw.CborWriteHeader(cbg.MajUnsignedInt, uint64(v)); err != nil {
|
||||
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(v)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -354,9 +390,11 @@ func (t *CompactedMessages) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range v {
|
||||
if err := cw.CborWriteHeader(cbg.MajUnsignedInt, uint64(v)); err != nil {
|
||||
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(v)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return nil
|
||||
@ -405,13 +443,32 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v types.Message
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
b, err := cr.ReadByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if b != cbg.CborNull[0] {
|
||||
if err := cr.UnreadByte(); err != nil {
|
||||
return err
|
||||
}
|
||||
t.Bls[i] = new(types.Message)
|
||||
if err := t.Bls[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Bls[i] pointer: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Bls[i] = &v
|
||||
}
|
||||
|
||||
// t.BlsIncludes ([][]uint64) (slice)
|
||||
@ -438,6 +495,9 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
maj, extra, err = cr.ReadHeader()
|
||||
if err != nil {
|
||||
@ -457,17 +517,27 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for j := 0; j < int(extra); j++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
maj, val, err := cr.ReadHeader()
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read uint64 for t.BlsIncludes[i] slice: %w", err)
|
||||
{
|
||||
|
||||
maj, extra, err = cr.ReadHeader()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if maj != cbg.MajUnsignedInt {
|
||||
return fmt.Errorf("wrong type for uint64 field")
|
||||
}
|
||||
t.BlsIncludes[i][j] = uint64(extra)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if maj != cbg.MajUnsignedInt {
|
||||
return xerrors.Errorf("value read for array t.BlsIncludes[i] was not a uint, instead got %d", maj)
|
||||
}
|
||||
|
||||
t.BlsIncludes[i][j] = uint64(val)
|
||||
}
|
||||
|
||||
}
|
||||
@ -493,13 +563,32 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v types.SignedMessage
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
b, err := cr.ReadByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if b != cbg.CborNull[0] {
|
||||
if err := cr.UnreadByte(); err != nil {
|
||||
return err
|
||||
}
|
||||
t.Secpk[i] = new(types.SignedMessage)
|
||||
if err := t.Secpk[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Secpk[i] pointer: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Secpk[i] = &v
|
||||
}
|
||||
|
||||
// t.SecpkIncludes ([][]uint64) (slice)
|
||||
@ -526,6 +615,9 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
maj, extra, err = cr.ReadHeader()
|
||||
if err != nil {
|
||||
@ -545,17 +637,27 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for j := 0; j < int(extra); j++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
maj, val, err := cr.ReadHeader()
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read uint64 for t.SecpkIncludes[i] slice: %w", err)
|
||||
{
|
||||
|
||||
maj, extra, err = cr.ReadHeader()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if maj != cbg.MajUnsignedInt {
|
||||
return fmt.Errorf("wrong type for uint64 field")
|
||||
}
|
||||
t.SecpkIncludes[i][j] = uint64(extra)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if maj != cbg.MajUnsignedInt {
|
||||
return xerrors.Errorf("value read for array t.SecpkIncludes[i] was not a uint, instead got %d", maj)
|
||||
}
|
||||
|
||||
t.SecpkIncludes[i][j] = uint64(val)
|
||||
}
|
||||
|
||||
}
|
||||
@ -642,13 +744,32 @@ func (t *BSTipSet) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v types.BlockHeader
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
b, err := cr.ReadByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if b != cbg.CborNull[0] {
|
||||
if err := cr.UnreadByte(); err != nil {
|
||||
return err
|
||||
}
|
||||
t.Blocks[i] = new(types.BlockHeader)
|
||||
if err := t.Blocks[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Blocks[i] pointer: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Blocks[i] = &v
|
||||
}
|
||||
|
||||
// t.Messages (exchange.CompactedMessages) (struct)
|
||||
|
@ -91,9 +91,11 @@ func (t *BlockHeader) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range t.Parents {
|
||||
if err := cbg.WriteCid(w, v); err != nil {
|
||||
return xerrors.Errorf("failed writing cid field t.Parents: %w", err)
|
||||
|
||||
if err := cbg.WriteCid(cw, v); err != nil {
|
||||
return xerrors.Errorf("failed to write cid field v: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// t.ParentWeight (big.Int) (struct)
|
||||
@ -249,13 +251,22 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v BeaconEntry
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
if err := t.BeaconEntries[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.BeaconEntries[i]: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.BeaconEntries[i] = v
|
||||
}
|
||||
|
||||
// t.WinPoStProof ([]proof.PoStProof) (slice)
|
||||
@ -278,13 +289,22 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v proof.PoStProof
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
if err := t.WinPoStProof[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.WinPoStProof[i]: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.WinPoStProof[i] = v
|
||||
}
|
||||
|
||||
// t.Parents ([]cid.Cid) (slice)
|
||||
@ -307,12 +327,25 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("reading cid field t.Parents failed: %w", err)
|
||||
{
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read cid field t.Parents[i]: %w", err)
|
||||
}
|
||||
|
||||
t.Parents[i] = c
|
||||
|
||||
}
|
||||
}
|
||||
t.Parents[i] = c
|
||||
}
|
||||
|
||||
// t.ParentWeight (big.Int) (struct)
|
||||
@ -1318,9 +1351,11 @@ func (t *BlockMsg) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range t.BlsMessages {
|
||||
if err := cbg.WriteCid(w, v); err != nil {
|
||||
return xerrors.Errorf("failed writing cid field t.BlsMessages: %w", err)
|
||||
|
||||
if err := cbg.WriteCid(cw, v); err != nil {
|
||||
return xerrors.Errorf("failed to write cid field v: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// t.SecpkMessages ([]cid.Cid) (slice)
|
||||
@ -1332,9 +1367,11 @@ func (t *BlockMsg) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range t.SecpkMessages {
|
||||
if err := cbg.WriteCid(w, v); err != nil {
|
||||
return xerrors.Errorf("failed writing cid field t.SecpkMessages: %w", err)
|
||||
|
||||
if err := cbg.WriteCid(cw, v); err != nil {
|
||||
return xerrors.Errorf("failed to write cid field v: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -1401,12 +1438,25 @@ func (t *BlockMsg) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("reading cid field t.BlsMessages failed: %w", err)
|
||||
{
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read cid field t.BlsMessages[i]: %w", err)
|
||||
}
|
||||
|
||||
t.BlsMessages[i] = c
|
||||
|
||||
}
|
||||
}
|
||||
t.BlsMessages[i] = c
|
||||
}
|
||||
|
||||
// t.SecpkMessages ([]cid.Cid) (slice)
|
||||
@ -1429,12 +1479,25 @@ func (t *BlockMsg) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("reading cid field t.SecpkMessages failed: %w", err)
|
||||
{
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read cid field t.SecpkMessages[i]: %w", err)
|
||||
}
|
||||
|
||||
t.SecpkMessages[i] = c
|
||||
|
||||
}
|
||||
}
|
||||
t.SecpkMessages[i] = c
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -1463,9 +1526,11 @@ func (t *ExpTipSet) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range t.Cids {
|
||||
if err := cbg.WriteCid(w, v); err != nil {
|
||||
return xerrors.Errorf("failed writing cid field t.Cids: %w", err)
|
||||
|
||||
if err := cbg.WriteCid(cw, v); err != nil {
|
||||
return xerrors.Errorf("failed to write cid field v: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// t.Blocks ([]*types.BlockHeader) (slice)
|
||||
@ -1538,12 +1603,25 @@ func (t *ExpTipSet) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("reading cid field t.Cids failed: %w", err)
|
||||
{
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read cid field t.Cids[i]: %w", err)
|
||||
}
|
||||
|
||||
t.Cids[i] = c
|
||||
|
||||
}
|
||||
}
|
||||
t.Cids[i] = c
|
||||
}
|
||||
|
||||
// t.Blocks ([]*types.BlockHeader) (slice)
|
||||
@ -1566,13 +1644,32 @@ func (t *ExpTipSet) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v BlockHeader
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
b, err := cr.ReadByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if b != cbg.CborNull[0] {
|
||||
if err := cr.UnreadByte(); err != nil {
|
||||
return err
|
||||
}
|
||||
t.Blocks[i] = new(BlockHeader)
|
||||
if err := t.Blocks[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Blocks[i] pointer: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Blocks[i] = &v
|
||||
}
|
||||
|
||||
// t.Height (abi.ChainEpoch) (int64)
|
||||
@ -1933,13 +2030,22 @@ func (t *Event) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v EventEntry
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
if err := t.Entries[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Entries[i]: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Entries[i] = v
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -1972,7 +2078,7 @@ func (t *EventEntry) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Key)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Key)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -2103,7 +2209,7 @@ func (t *GasTrace) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Name)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Name)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -2756,13 +2862,32 @@ func (t *ExecutionTrace) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v GasTrace
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
b, err := cr.ReadByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if b != cbg.CborNull[0] {
|
||||
if err := cr.UnreadByte(); err != nil {
|
||||
return err
|
||||
}
|
||||
t.GasCharges[i] = new(GasTrace)
|
||||
if err := t.GasCharges[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.GasCharges[i] pointer: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.GasCharges[i] = &v
|
||||
}
|
||||
|
||||
// t.Subcalls ([]types.ExecutionTrace) (slice)
|
||||
@ -2785,13 +2910,22 @@ func (t *ExecutionTrace) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v ExecutionTrace
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
if err := t.Subcalls[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Subcalls[i]: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Subcalls[i] = v
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -38,7 +38,7 @@ func (t *CarbNode) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Sub"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Sub")); err != nil {
|
||||
if _, err := cw.WriteString(string("Sub")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -50,9 +50,11 @@ func (t *CarbNode) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range t.Sub {
|
||||
if err := cbg.WriteCid(w, v); err != nil {
|
||||
return xerrors.Errorf("failed writing cid field t.Sub: %w", err)
|
||||
|
||||
if err := cbg.WriteCid(cw, v); err != nil {
|
||||
return xerrors.Errorf("failed to write cid field v: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -116,12 +118,25 @@ func (t *CarbNode) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("reading cid field t.Sub failed: %w", err)
|
||||
{
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read cid field t.Sub[i]: %w", err)
|
||||
}
|
||||
|
||||
t.Sub[i] = c
|
||||
|
||||
}
|
||||
}
|
||||
t.Sub[i] = c
|
||||
}
|
||||
|
||||
default:
|
||||
|
@ -44,7 +44,7 @@ func (t *State) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Value)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Value)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -117,13 +117,32 @@ func (t *State) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v UnmarshallableCBOR
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
b, err := cr.ReadByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if b != cbg.CborNull[0] {
|
||||
if err := cr.UnreadByte(); err != nil {
|
||||
return err
|
||||
}
|
||||
t.Unmarshallable[i] = new(UnmarshallableCBOR)
|
||||
if err := t.Unmarshallable[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Unmarshallable[i] pointer: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Unmarshallable[i] = &v
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -177,9 +196,11 @@ func (t *CallerValidationArgs) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range t.Types {
|
||||
if err := cbg.WriteCid(w, v); err != nil {
|
||||
return xerrors.Errorf("failed writing cid field t.Types: %w", err)
|
||||
|
||||
if err := cbg.WriteCid(cw, v); err != nil {
|
||||
return xerrors.Errorf("failed to write cid field v: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -252,13 +273,22 @@ func (t *CallerValidationArgs) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v address.Address
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
if err := t.Addrs[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Addrs[i]: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Addrs[i] = v
|
||||
}
|
||||
|
||||
// t.Types ([]cid.Cid) (slice)
|
||||
@ -281,12 +311,25 @@ func (t *CallerValidationArgs) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("reading cid field t.Types failed: %w", err)
|
||||
{
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read cid field t.Types[i]: %w", err)
|
||||
}
|
||||
|
||||
t.Types[i] = c
|
||||
|
||||
}
|
||||
}
|
||||
t.Types[i] = c
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -746,7 +789,7 @@ func (t *MutateStateArgs) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Value)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Value)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -857,7 +900,7 @@ func (t *AbortWithArgs) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Message))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Message)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Message)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -43,9 +43,11 @@ func (t *HelloMessage) MarshalCBOR(w io.Writer) error {
|
||||
return err
|
||||
}
|
||||
for _, v := range t.HeaviestTipSet {
|
||||
if err := cbg.WriteCid(w, v); err != nil {
|
||||
return xerrors.Errorf("failed writing cid field t.HeaviestTipSet: %w", err)
|
||||
|
||||
if err := cbg.WriteCid(cw, v); err != nil {
|
||||
return xerrors.Errorf("failed to write cid field v: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// t.HeaviestTipSetHeight (abi.ChainEpoch) (int64)
|
||||
@ -116,12 +118,25 @@ func (t *HelloMessage) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("reading cid field t.HeaviestTipSet failed: %w", err)
|
||||
{
|
||||
|
||||
c, err := cbg.ReadCid(cr)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to read cid field t.HeaviestTipSet[i]: %w", err)
|
||||
}
|
||||
|
||||
t.HeaviestTipSet[i] = c
|
||||
|
||||
}
|
||||
}
|
||||
t.HeaviestTipSet[i] = c
|
||||
}
|
||||
|
||||
// t.HeaviestTipSetHeight (abi.ChainEpoch) (int64)
|
||||
|
@ -41,7 +41,7 @@ func (t *VoucherInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Proof"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Proof")); err != nil {
|
||||
if _, err := cw.WriteString(string("Proof")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ func (t *VoucherInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Voucher"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Voucher")); err != nil {
|
||||
if _, err := cw.WriteString(string("Voucher")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ func (t *VoucherInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Submitted"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Submitted")); err != nil {
|
||||
if _, err := cw.WriteString(string("Submitted")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Amount"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Amount")); err != nil {
|
||||
if _, err := cw.WriteString(string("Amount")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Target"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Target")); err != nil {
|
||||
if _, err := cw.WriteString(string("Target")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Channel"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Channel")); err != nil {
|
||||
if _, err := cw.WriteString(string("Channel")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Control"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Control")); err != nil {
|
||||
if _, err := cw.WriteString(string("Control")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -282,7 +282,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("NextLane"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("NextLane")); err != nil {
|
||||
if _, err := cw.WriteString(string("NextLane")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Settling"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Settling")); err != nil {
|
||||
if _, err := cw.WriteString(string("Settling")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Vouchers"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Vouchers")); err != nil {
|
||||
if _, err := cw.WriteString(string("Vouchers")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -339,7 +339,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ChannelID"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("ChannelID")); err != nil {
|
||||
if _, err := cw.WriteString(string("ChannelID")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ChannelID))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.ChannelID)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.ChannelID)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -362,7 +362,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CreateMsg"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("CreateMsg")); err != nil {
|
||||
if _, err := cw.WriteString(string("CreateMsg")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -384,7 +384,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Direction"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Direction")); err != nil {
|
||||
if _, err := cw.WriteString(string("Direction")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -400,7 +400,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("AddFundsMsg"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("AddFundsMsg")); err != nil {
|
||||
if _, err := cw.WriteString(string("AddFundsMsg")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -422,7 +422,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PendingAmount"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("PendingAmount")); err != nil {
|
||||
if _, err := cw.WriteString(string("PendingAmount")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -438,7 +438,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("AvailableAmount"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("AvailableAmount")); err != nil {
|
||||
if _, err := cw.WriteString(string("AvailableAmount")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -454,7 +454,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PendingAvailableAmount"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("PendingAvailableAmount")); err != nil {
|
||||
if _, err := cw.WriteString(string("PendingAvailableAmount")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -606,13 +606,32 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v VoucherInfo
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
b, err := cr.ReadByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if b != cbg.CborNull[0] {
|
||||
if err := cr.UnreadByte(); err != nil {
|
||||
return err
|
||||
}
|
||||
t.Vouchers[i] = new(VoucherInfo)
|
||||
if err := t.Vouchers[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Vouchers[i] pointer: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Vouchers[i] = &v
|
||||
}
|
||||
|
||||
// t.ChannelID (string) (string)
|
||||
@ -746,7 +765,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Err"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Err")); err != nil {
|
||||
if _, err := cw.WriteString(string("Err")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -757,7 +776,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Err))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Err)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Err)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -769,7 +788,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("MsgCid"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("MsgCid")); err != nil {
|
||||
if _, err := cw.WriteString(string("MsgCid")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -785,7 +804,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Received"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Received")); err != nil {
|
||||
if _, err := cw.WriteString(string("Received")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -801,7 +820,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ChannelID"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("ChannelID")); err != nil {
|
||||
if _, err := cw.WriteString(string("ChannelID")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -812,7 +831,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ChannelID))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.ChannelID)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.ChannelID)); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
@ -43,7 +43,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Log"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Log")); err != nil {
|
||||
if _, err := cw.WriteString(string("Log")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CommD"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("CommD")); err != nil {
|
||||
if _, err := cw.WriteString(string("CommD")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CommR"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("CommR")); err != nil {
|
||||
if _, err := cw.WriteString(string("CommR")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Proof"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Proof")); err != nil {
|
||||
if _, err := cw.WriteString(string("Proof")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("State"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("State")); err != nil {
|
||||
if _, err := cw.WriteString(string("State")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.State))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.State)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.State)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Pieces"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Pieces")); err != nil {
|
||||
if _, err := cw.WriteString(string("Pieces")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Return"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Return")); err != nil {
|
||||
if _, err := cw.WriteString(string("Return")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Return))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Return)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Return)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("LastErr"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("LastErr")); err != nil {
|
||||
if _, err := cw.WriteString(string("LastErr")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.LastErr))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.LastErr)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.LastErr)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -230,7 +230,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CCPieces"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("CCPieces")); err != nil {
|
||||
if _, err := cw.WriteString(string("CCPieces")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CCUpdate"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("CCUpdate")); err != nil {
|
||||
if _, err := cw.WriteString(string("CCUpdate")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SeedEpoch"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("SeedEpoch")); err != nil {
|
||||
if _, err := cw.WriteString(string("SeedEpoch")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SeedValue"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("SeedValue")); err != nil {
|
||||
if _, err := cw.WriteString(string("SeedValue")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorType"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("SectorType")); err != nil {
|
||||
if _, err := cw.WriteString(string("SectorType")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -339,7 +339,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TicketEpoch"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("TicketEpoch")); err != nil {
|
||||
if _, err := cw.WriteString(string("TicketEpoch")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -361,7 +361,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TicketValue"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("TicketValue")); err != nil {
|
||||
if _, err := cw.WriteString(string("TicketValue")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -385,7 +385,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CreationTime"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("CreationTime")); err != nil {
|
||||
if _, err := cw.WriteString(string("CreationTime")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -407,7 +407,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorNumber"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("SectorNumber")); err != nil {
|
||||
if _, err := cw.WriteString(string("SectorNumber")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TerminatedAt"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("TerminatedAt")); err != nil {
|
||||
if _, err := cw.WriteString(string("TerminatedAt")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -445,7 +445,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("UpdateSealed"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("UpdateSealed")); err != nil {
|
||||
if _, err := cw.WriteString(string("UpdateSealed")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -467,7 +467,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CommitMessage"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("CommitMessage")); err != nil {
|
||||
if _, err := cw.WriteString(string("CommitMessage")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -489,7 +489,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("InvalidProofs"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("InvalidProofs")); err != nil {
|
||||
if _, err := cw.WriteString(string("InvalidProofs")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -505,7 +505,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommit1Out"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("PreCommit1Out")); err != nil {
|
||||
if _, err := cw.WriteString(string("PreCommit1Out")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -529,7 +529,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("FaultReportMsg"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("FaultReportMsg")); err != nil {
|
||||
if _, err := cw.WriteString(string("FaultReportMsg")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -551,7 +551,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("UpdateUnsealed"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("UpdateUnsealed")); err != nil {
|
||||
if _, err := cw.WriteString(string("UpdateUnsealed")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -573,7 +573,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommit2Fails"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("PreCommit2Fails")); err != nil {
|
||||
if _, err := cw.WriteString(string("PreCommit2Fails")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -589,7 +589,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitTipSet"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("PreCommitTipSet")); err != nil {
|
||||
if _, err := cw.WriteString(string("PreCommitTipSet")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -605,7 +605,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataCache"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("RemoteDataCache")); err != nil {
|
||||
if _, err := cw.WriteString(string("RemoteDataCache")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -621,7 +621,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitDeposit"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("PreCommitDeposit")); err != nil {
|
||||
if _, err := cw.WriteString(string("PreCommitDeposit")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -637,7 +637,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitMessage"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("PreCommitMessage")); err != nil {
|
||||
if _, err := cw.WriteString(string("PreCommitMessage")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -659,7 +659,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataSealed"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("RemoteDataSealed")); err != nil {
|
||||
if _, err := cw.WriteString(string("RemoteDataSealed")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -675,7 +675,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TerminateMessage"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("TerminateMessage")); err != nil {
|
||||
if _, err := cw.WriteString(string("TerminateMessage")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -697,7 +697,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataUnsealed"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("RemoteDataUnsealed")); err != nil {
|
||||
if _, err := cw.WriteString(string("RemoteDataUnsealed")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -713,7 +713,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ReplicaUpdateProof"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("ReplicaUpdateProof")); err != nil {
|
||||
if _, err := cw.WriteString(string("ReplicaUpdateProof")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -737,7 +737,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataFinalized"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("RemoteDataFinalized")); err != nil {
|
||||
if _, err := cw.WriteString(string("RemoteDataFinalized")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -753,7 +753,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ReplicaUpdateMessage"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("ReplicaUpdateMessage")); err != nil {
|
||||
if _, err := cw.WriteString(string("ReplicaUpdateMessage")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -775,7 +775,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteCommit1Endpoint"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("RemoteCommit1Endpoint")); err != nil {
|
||||
if _, err := cw.WriteString(string("RemoteCommit1Endpoint")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -786,7 +786,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteCommit1Endpoint))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.RemoteCommit1Endpoint)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.RemoteCommit1Endpoint)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -798,7 +798,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteCommit2Endpoint"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("RemoteCommit2Endpoint")); err != nil {
|
||||
if _, err := cw.WriteString(string("RemoteCommit2Endpoint")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -809,7 +809,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteCommit2Endpoint))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.RemoteCommit2Endpoint)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.RemoteCommit2Endpoint)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -821,7 +821,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteSealingDoneEndpoint"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("RemoteSealingDoneEndpoint")); err != nil {
|
||||
if _, err := cw.WriteString(string("RemoteSealingDoneEndpoint")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -832,7 +832,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteSealingDoneEndpoint))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.RemoteSealingDoneEndpoint)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.RemoteSealingDoneEndpoint)); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
@ -897,13 +897,22 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v Log
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
if err := t.Log[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Log[i]: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Log[i] = v
|
||||
}
|
||||
|
||||
// t.CommD (cid.Cid) (struct)
|
||||
@ -1006,13 +1015,22 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v api.SectorPiece
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
if err := t.Pieces[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Pieces[i]: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Pieces[i] = v
|
||||
}
|
||||
|
||||
// t.Return (sealing.ReturnState) (string)
|
||||
@ -1058,13 +1076,22 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v api.SectorPiece
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
if err := t.CCPieces[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.CCPieces[i]: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.CCPieces[i] = v
|
||||
}
|
||||
|
||||
// t.CCUpdate (bool) (bool)
|
||||
@ -1669,7 +1696,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Kind"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Kind")); err != nil {
|
||||
if _, err := cw.WriteString(string("Kind")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1680,7 +1707,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Kind))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Kind)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Kind)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1692,7 +1719,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Trace"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Trace")); err != nil {
|
||||
if _, err := cw.WriteString(string("Trace")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1703,7 +1730,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Trace))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Trace)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Trace)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1715,7 +1742,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Message"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Message")); err != nil {
|
||||
if _, err := cw.WriteString(string("Message")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1726,7 +1753,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Message))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Message)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Message)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1738,7 +1765,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Timestamp"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Timestamp")); err != nil {
|
||||
if _, err := cw.WriteString(string("Timestamp")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ func (t *Call) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ID"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("ID")); err != nil {
|
||||
if _, err := cw.WriteString(string("ID")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ func (t *Call) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("State"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("State")); err != nil {
|
||||
if _, err := cw.WriteString(string("State")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ func (t *Call) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Result"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Result")); err != nil {
|
||||
if _, err := cw.WriteString(string("Result")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ func (t *Call) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RetType"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("RetType")); err != nil {
|
||||
if _, err := cw.WriteString(string("RetType")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ func (t *Call) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RetType))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.RetType)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.RetType)); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
@ -228,7 +228,7 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ID"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("ID")); err != nil {
|
||||
if _, err := cw.WriteString(string("ID")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Status"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Status")); err != nil {
|
||||
if _, err := cw.WriteString(string("Status")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Status))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Status)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Status)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("StartTime"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("StartTime")); err != nil {
|
||||
if _, err := cw.WriteString(string("StartTime")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("WorkError"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("WorkError")); err != nil {
|
||||
if _, err := cw.WriteString(string("WorkError")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -300,7 +300,7 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.WorkError))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.WorkError)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.WorkError)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("WorkerCall"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("WorkerCall")); err != nil {
|
||||
if _, err := cw.WriteString(string("WorkerCall")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("WorkerHostname"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("WorkerHostname")); err != nil {
|
||||
if _, err := cw.WriteString(string("WorkerHostname")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -339,7 +339,7 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.WorkerHostname))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.WorkerHostname)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.WorkerHostname)); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
@ -491,7 +491,7 @@ func (t *WorkID) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Method"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Method")); err != nil {
|
||||
if _, err := cw.WriteString(string("Method")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -502,7 +502,7 @@ func (t *WorkID) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Method))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Method)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Method)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -514,7 +514,7 @@ func (t *WorkID) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Params"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Params")); err != nil {
|
||||
if _, err := cw.WriteString(string("Params")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -525,7 +525,7 @@ func (t *WorkID) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Params))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Params)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Params)); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
@ -38,7 +38,7 @@ func (t *CallID) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ID"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("ID")); err != nil {
|
||||
if _, err := cw.WriteString(string("ID")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ func (t *CallID) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Sector"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Sector")); err != nil {
|
||||
if _, err := cw.WriteString(string("Sector")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ func (t *SecDataHttpHeader) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Key"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Key")); err != nil {
|
||||
if _, err := cw.WriteString(string("Key")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ func (t *SecDataHttpHeader) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Key)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Key)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ func (t *SecDataHttpHeader) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Value"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Value")); err != nil {
|
||||
if _, err := cw.WriteString(string("Value")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ func (t *SecDataHttpHeader) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.Value)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.Value)); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
@ -302,7 +302,7 @@ func (t *SectorLocation) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("URL"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("URL")); err != nil {
|
||||
if _, err := cw.WriteString(string("URL")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ func (t *SectorLocation) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.URL))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string(t.URL)); err != nil {
|
||||
if _, err := cw.WriteString(string(t.URL)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -325,7 +325,7 @@ func (t *SectorLocation) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Local"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Local")); err != nil {
|
||||
if _, err := cw.WriteString(string("Local")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -341,7 +341,7 @@ func (t *SectorLocation) MarshalCBOR(w io.Writer) error {
|
||||
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Headers"))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.WriteString(w, string("Headers")); err != nil {
|
||||
if _, err := cw.WriteString(string("Headers")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -448,13 +448,22 @@ func (t *SectorLocation) UnmarshalCBOR(r io.Reader) (err error) {
|
||||
}
|
||||
|
||||
for i := 0; i < int(extra); i++ {
|
||||
{
|
||||
var maj byte
|
||||
var extra uint64
|
||||
var err error
|
||||
_ = maj
|
||||
_ = extra
|
||||
_ = err
|
||||
|
||||
var v SecDataHttpHeader
|
||||
if err := v.UnmarshalCBOR(cr); err != nil {
|
||||
return err
|
||||
{
|
||||
|
||||
if err := t.Headers[i].UnmarshalCBOR(cr); err != nil {
|
||||
return xerrors.Errorf("unmarshaling t.Headers[i]: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
t.Headers[i] = v
|
||||
}
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user