Update cbor-gen to latest master
This commit is contained in:
@@ -28,6 +28,10 @@ func (t *VoucherInfo) MarshalCBOR(w io.Writer) error {
|
||||
}
|
||||
|
||||
// t.Proof ([]uint8) (slice)
|
||||
if len(t.Proof) > cbg.ByteArrayMaxLen {
|
||||
return xerrors.Errorf("Byte array in field t.Proof was too long")
|
||||
}
|
||||
|
||||
if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajByteString, uint64(len(t.Proof)))); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -123,6 +127,10 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
|
||||
}
|
||||
|
||||
// t.Vouchers ([]*paych.VoucherInfo) (slice)
|
||||
if len(t.Vouchers) > cbg.MaxLength {
|
||||
return xerrors.Errorf("Slice value in field t.Vouchers was too long")
|
||||
}
|
||||
|
||||
if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajArray, uint64(len(t.Vouchers)))); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user