From e01ffe6bc52f4567544a97788b75a09ba6badf7b Mon Sep 17 00:00:00 2001 From: Yossi Gilad Date: Sat, 26 Aug 2023 17:36:52 -0400 Subject: [PATCH] msgp --- agreement/msgp_gen.go | 106 +++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/agreement/msgp_gen.go b/agreement/msgp_gen.go index 6c293e4edb..5a5efa7ddc 100644 --- a/agreement/msgp_gen.go +++ b/agreement/msgp_gen.go @@ -3949,16 +3949,16 @@ func PeriodRouterMaxSize() (s int) { func (z *player) MarshalMsg(b []byte) (o []byte) { o = msgp.Require(b, z.Msgsize()) // omitempty: check for empty values - zb0002Len := uint32(9) - var zb0002Mask uint16 /* 12 bits */ + zb0001Len := uint32(9) + var zb0001Mask uint16 /* 12 bits */ if (*z).OldDeadline == 0 { - zb0002Len-- - zb0002Mask |= 0x1 + zb0001Len-- + zb0001Mask |= 0x1 } - // variable map header, size zb0002Len - o = append(o, 0x80|uint8(zb0002Len)) - if zb0002Len != 0 { - if (zb0002Mask & 0x1) == 0 { // if not empty + // variable map header, size zb0001Len + o = append(o, 0x80|uint8(zb0001Len)) + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not empty // string "Deadline" o = append(o, 0xa8, 0x44, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65) o = msgp.AppendDuration(o, (*z).OldDeadline) @@ -4000,101 +4000,101 @@ func (_ *player) CanMarshalMsg(z interface{}) bool { func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { var field []byte _ = field - var zb0002 int - var zb0003 bool - zb0002, zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) + var zb0001 int + var zb0002 bool + zb0001, zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) if _, ok := err.(msgp.TypeError); ok { - zb0002, zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) + zb0001, zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) if err != nil { err = msgp.WrapError(err) return } - if zb0002 > 0 { - zb0002-- + if zb0001 > 0 { + zb0001-- bts, err = (*z).Round.UnmarshalMsg(bts) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Round") return } } - if zb0002 > 0 { - zb0002-- + if zb0001 > 0 { + zb0001-- { - var zb0004 uint64 - zb0004, bts, err = msgp.ReadUint64Bytes(bts) + var zb0003 uint64 + zb0003, bts, err = msgp.ReadUint64Bytes(bts) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Period") return } - (*z).Period = period(zb0004) + (*z).Period = period(zb0003) } } - if zb0002 > 0 { - zb0002-- + if zb0001 > 0 { + zb0001-- { - var zb0005 uint64 - zb0005, bts, err = msgp.ReadUint64Bytes(bts) + var zb0004 uint64 + zb0004, bts, err = msgp.ReadUint64Bytes(bts) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Step") return } - (*z).Step = step(zb0005) + (*z).Step = step(zb0004) } } - if zb0002 > 0 { - zb0002-- + if zb0001 > 0 { + zb0001-- { - var zb0006 uint64 - zb0006, bts, err = msgp.ReadUint64Bytes(bts) + var zb0005 uint64 + zb0005, bts, err = msgp.ReadUint64Bytes(bts) if err != nil { err = msgp.WrapError(err, "struct-from-array", "LastConcluding") return } - (*z).LastConcluding = step(zb0006) + (*z).LastConcluding = step(zb0005) } } - if zb0002 > 0 { - zb0002-- + if zb0001 > 0 { + zb0001-- bts, err = (*z).Deadline.UnmarshalMsg(bts) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Deadline") return } } - if zb0002 > 0 { - zb0002-- + if zb0001 > 0 { + zb0001-- (*z).OldDeadline, bts, err = msgp.ReadDurationBytes(bts) if err != nil { err = msgp.WrapError(err, "struct-from-array", "OldDeadline") return } } - if zb0002 > 0 { - zb0002-- + if zb0001 > 0 { + zb0001-- (*z).Napping, bts, err = msgp.ReadBoolBytes(bts) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Napping") return } } - if zb0002 > 0 { - zb0002-- + if zb0001 > 0 { + zb0001-- (*z).FastRecoveryDeadline, bts, err = msgp.ReadDurationBytes(bts) if err != nil { err = msgp.WrapError(err, "struct-from-array", "FastRecoveryDeadline") return } } - if zb0002 > 0 { - zb0002-- + if zb0001 > 0 { + zb0001-- bts, err = (*z).Pending.UnmarshalMsg(bts) if err != nil { err = msgp.WrapError(err, "struct-from-array", "Pending") return } } - if zb0002 > 0 { - err = msgp.ErrTooManyArrayFields(zb0002) + if zb0001 > 0 { + err = msgp.ErrTooManyArrayFields(zb0001) if err != nil { err = msgp.WrapError(err, "struct-from-array") return @@ -4105,11 +4105,11 @@ func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err) return } - if zb0003 { + if zb0002 { (*z) = player{} } - for zb0002 > 0 { - zb0002-- + for zb0001 > 0 { + zb0001-- field, bts, err = msgp.ReadMapKeyZC(bts) if err != nil { err = msgp.WrapError(err) @@ -4124,33 +4124,33 @@ func (z *player) UnmarshalMsg(bts []byte) (o []byte, err error) { } case "Period": { - var zb0007 uint64 - zb0007, bts, err = msgp.ReadUint64Bytes(bts) + var zb0006 uint64 + zb0006, bts, err = msgp.ReadUint64Bytes(bts) if err != nil { err = msgp.WrapError(err, "Period") return } - (*z).Period = period(zb0007) + (*z).Period = period(zb0006) } case "Step": { - var zb0008 uint64 - zb0008, bts, err = msgp.ReadUint64Bytes(bts) + var zb0007 uint64 + zb0007, bts, err = msgp.ReadUint64Bytes(bts) if err != nil { err = msgp.WrapError(err, "Step") return } - (*z).Step = step(zb0008) + (*z).Step = step(zb0007) } case "LastConcluding": { - var zb0009 uint64 - zb0009, bts, err = msgp.ReadUint64Bytes(bts) + var zb0008 uint64 + zb0008, bts, err = msgp.ReadUint64Bytes(bts) if err != nil { err = msgp.WrapError(err, "LastConcluding") return } - (*z).LastConcluding = step(zb0009) + (*z).LastConcluding = step(zb0008) } case "TimersDeadline": bts, err = (*z).Deadline.UnmarshalMsg(bts)