diff options
Diffstat (limited to 'data/transactions/msgp_gen.go')
-rw-r--r-- | data/transactions/msgp_gen.go | 633 |
1 files changed, 570 insertions, 63 deletions
diff --git a/data/transactions/msgp_gen.go b/data/transactions/msgp_gen.go index 365e2d540..009de07b5 100644 --- a/data/transactions/msgp_gen.go +++ b/data/transactions/msgp_gen.go @@ -3,6 +3,8 @@ package transactions // Code generated by github.com/algorand/msgp DO NOT EDIT. import ( + "sort" + "github.com/algorand/go-algorand/config" "github.com/algorand/go-algorand/crypto" "github.com/algorand/go-algorand/data/basics" @@ -58,6 +60,14 @@ import ( // |-----> (*) Msgsize // |-----> (*) MsgIsZero // +// EvalDelta +// |-----> (*) MarshalMsg +// |-----> (*) CanMarshalMsg +// |-----> (*) UnmarshalMsg +// |-----> (*) CanUnmarshalMsg +// |-----> (*) Msgsize +// |-----> (*) MsgIsZero +// // Header // |-----> (*) MarshalMsg // |-----> (*) CanMarshalMsg @@ -763,32 +773,40 @@ func (z *ApplicationCallTxnFields) MsgIsZero() bool { func (z *ApplyData) MarshalMsg(b []byte) (o []byte) { o = msgp.Require(b, z.Msgsize()) // omitempty: check for empty values - zb0001Len := uint32(6) - var zb0001Mask uint8 /* 7 bits */ + zb0001Len := uint32(8) + var zb0001Mask uint16 /* 9 bits */ if (*z).AssetClosingAmount == 0 { zb0001Len-- zb0001Mask |= 0x2 } - if (*z).ClosingAmount.MsgIsZero() { + if (*z).ApplicationID.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x4 } - if (*z).EvalDelta.MsgIsZero() { + if (*z).ClosingAmount.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x8 } - if (*z).CloseRewards.MsgIsZero() { + if (*z).ConfigAsset.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x10 } - if (*z).ReceiverRewards.MsgIsZero() { + if (*z).EvalDelta.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x20 } - if (*z).SenderRewards.MsgIsZero() { + if (*z).CloseRewards.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x40 } + if (*z).ReceiverRewards.MsgIsZero() { + zb0001Len-- + zb0001Mask |= 0x80 + } + if (*z).SenderRewards.MsgIsZero() { + zb0001Len-- + zb0001Mask |= 0x100 + } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) if zb0001Len != 0 { @@ -798,26 +816,36 @@ func (z *ApplyData) MarshalMsg(b []byte) (o []byte) { o = msgp.AppendUint64(o, (*z).AssetClosingAmount) } if (zb0001Mask & 0x4) == 0 { // if not empty + // string "apid" + o = append(o, 0xa4, 0x61, 0x70, 0x69, 0x64) + o = (*z).ApplicationID.MarshalMsg(o) + } + if (zb0001Mask & 0x8) == 0 { // if not empty // string "ca" o = append(o, 0xa2, 0x63, 0x61) o = (*z).ClosingAmount.MarshalMsg(o) } - if (zb0001Mask & 0x8) == 0 { // if not empty + if (zb0001Mask & 0x10) == 0 { // if not empty + // string "caid" + o = append(o, 0xa4, 0x63, 0x61, 0x69, 0x64) + o = (*z).ConfigAsset.MarshalMsg(o) + } + if (zb0001Mask & 0x20) == 0 { // if not empty // string "dt" o = append(o, 0xa2, 0x64, 0x74) o = (*z).EvalDelta.MarshalMsg(o) } - if (zb0001Mask & 0x10) == 0 { // if not empty + if (zb0001Mask & 0x40) == 0 { // if not empty // string "rc" o = append(o, 0xa2, 0x72, 0x63) o = (*z).CloseRewards.MarshalMsg(o) } - if (zb0001Mask & 0x20) == 0 { // if not empty + if (zb0001Mask & 0x80) == 0 { // if not empty // string "rr" o = append(o, 0xa2, 0x72, 0x72) o = (*z).ReceiverRewards.MarshalMsg(o) } - if (zb0001Mask & 0x40) == 0 { // if not empty + if (zb0001Mask & 0x100) == 0 { // if not empty // string "rs" o = append(o, 0xa2, 0x72, 0x73) o = (*z).SenderRewards.MarshalMsg(o) @@ -893,6 +921,22 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { } } if zb0001 > 0 { + zb0001-- + bts, err = (*z).ConfigAsset.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "ConfigAsset") + return + } + } + if zb0001 > 0 { + zb0001-- + bts, err = (*z).ApplicationID.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "ApplicationID") + return + } + } + if zb0001 > 0 { err = msgp.ErrTooManyArrayFields(zb0001) if err != nil { err = msgp.WrapError(err, "struct-from-array") @@ -951,6 +995,18 @@ func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "EvalDelta") return } + case "caid": + bts, err = (*z).ConfigAsset.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "ConfigAsset") + return + } + case "apid": + bts, err = (*z).ApplicationID.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "ApplicationID") + return + } default: err = msgp.ErrNoField(string(field)) if err != nil { @@ -971,13 +1027,13 @@ func (_ *ApplyData) CanUnmarshalMsg(z interface{}) bool { // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message func (z *ApplyData) Msgsize() (s int) { - s = 1 + 3 + (*z).ClosingAmount.Msgsize() + 4 + msgp.Uint64Size + 3 + (*z).SenderRewards.Msgsize() + 3 + (*z).ReceiverRewards.Msgsize() + 3 + (*z).CloseRewards.Msgsize() + 3 + (*z).EvalDelta.Msgsize() + s = 1 + 3 + (*z).ClosingAmount.Msgsize() + 4 + msgp.Uint64Size + 3 + (*z).SenderRewards.Msgsize() + 3 + (*z).ReceiverRewards.Msgsize() + 3 + (*z).CloseRewards.Msgsize() + 3 + (*z).EvalDelta.Msgsize() + 5 + (*z).ConfigAsset.Msgsize() + 5 + (*z).ApplicationID.Msgsize() return } // MsgIsZero returns whether this is a zero value func (z *ApplyData) MsgIsZero() bool { - return ((*z).ClosingAmount.MsgIsZero()) && ((*z).AssetClosingAmount == 0) && ((*z).SenderRewards.MsgIsZero()) && ((*z).ReceiverRewards.MsgIsZero()) && ((*z).CloseRewards.MsgIsZero()) && ((*z).EvalDelta.MsgIsZero()) + return ((*z).ClosingAmount.MsgIsZero()) && ((*z).AssetClosingAmount == 0) && ((*z).SenderRewards.MsgIsZero()) && ((*z).ReceiverRewards.MsgIsZero()) && ((*z).CloseRewards.MsgIsZero()) && ((*z).EvalDelta.MsgIsZero()) && ((*z).ConfigAsset.MsgIsZero()) && ((*z).ApplicationID.MsgIsZero()) } // MarshalMsg implements msgp.Marshaler @@ -1612,6 +1668,365 @@ func (z *CompactCertTxnFields) MsgIsZero() bool { } // MarshalMsg implements msgp.Marshaler +func (z *EvalDelta) MarshalMsg(b []byte) (o []byte) { + o = msgp.Require(b, z.Msgsize()) + // omitempty: check for empty values + zb0005Len := uint32(4) + var zb0005Mask uint8 /* 5 bits */ + if (*z).GlobalDelta.MsgIsZero() { + zb0005Len-- + zb0005Mask |= 0x2 + } + if len((*z).InnerTxns) == 0 { + zb0005Len-- + zb0005Mask |= 0x4 + } + if len((*z).LocalDeltas) == 0 { + zb0005Len-- + zb0005Mask |= 0x8 + } + if len((*z).Logs) == 0 { + zb0005Len-- + zb0005Mask |= 0x10 + } + // variable map header, size zb0005Len + o = append(o, 0x80|uint8(zb0005Len)) + if zb0005Len != 0 { + if (zb0005Mask & 0x2) == 0 { // if not empty + // string "gd" + o = append(o, 0xa2, 0x67, 0x64) + o = (*z).GlobalDelta.MarshalMsg(o) + } + if (zb0005Mask & 0x4) == 0 { // if not empty + // string "itx" + o = append(o, 0xa3, 0x69, 0x74, 0x78) + if (*z).InnerTxns == nil { + o = msgp.AppendNil(o) + } else { + o = msgp.AppendArrayHeader(o, uint32(len((*z).InnerTxns))) + } + for zb0004 := range (*z).InnerTxns { + o = (*z).InnerTxns[zb0004].MarshalMsg(o) + } + } + if (zb0005Mask & 0x8) == 0 { // if not empty + // string "ld" + o = append(o, 0xa2, 0x6c, 0x64) + if (*z).LocalDeltas == nil { + o = msgp.AppendNil(o) + } else { + o = msgp.AppendMapHeader(o, uint32(len((*z).LocalDeltas))) + } + zb0001_keys := make([]uint64, 0, len((*z).LocalDeltas)) + for zb0001 := range (*z).LocalDeltas { + zb0001_keys = append(zb0001_keys, zb0001) + } + sort.Sort(SortUint64(zb0001_keys)) + for _, zb0001 := range zb0001_keys { + zb0002 := (*z).LocalDeltas[zb0001] + _ = zb0002 + o = msgp.AppendUint64(o, zb0001) + o = zb0002.MarshalMsg(o) + } + } + if (zb0005Mask & 0x10) == 0 { // if not empty + // string "lg" + o = append(o, 0xa2, 0x6c, 0x67) + if (*z).Logs == nil { + o = msgp.AppendNil(o) + } else { + o = msgp.AppendArrayHeader(o, uint32(len((*z).Logs))) + } + for zb0003 := range (*z).Logs { + o = msgp.AppendString(o, (*z).Logs[zb0003]) + } + } + } + return +} + +func (_ *EvalDelta) CanMarshalMsg(z interface{}) bool { + _, ok := (z).(*EvalDelta) + return ok +} + +// UnmarshalMsg implements msgp.Unmarshaler +func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error) { + var field []byte + _ = field + var zb0005 int + var zb0006 bool + zb0005, zb0006, bts, err = msgp.ReadMapHeaderBytes(bts) + if _, ok := err.(msgp.TypeError); ok { + zb0005, zb0006, bts, err = msgp.ReadArrayHeaderBytes(bts) + if err != nil { + err = msgp.WrapError(err) + return + } + if zb0005 > 0 { + zb0005-- + bts, err = (*z).GlobalDelta.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "GlobalDelta") + return + } + } + if zb0005 > 0 { + zb0005-- + var zb0007 int + var zb0008 bool + zb0007, zb0008, bts, err = msgp.ReadMapHeaderBytes(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "LocalDeltas") + return + } + if zb0007 > config.MaxEvalDeltaAccounts { + err = msgp.ErrOverflow(uint64(zb0007), uint64(config.MaxEvalDeltaAccounts)) + err = msgp.WrapError(err, "struct-from-array", "LocalDeltas") + return + } + if zb0008 { + (*z).LocalDeltas = nil + } else if (*z).LocalDeltas == nil { + (*z).LocalDeltas = make(map[uint64]basics.StateDelta, zb0007) + } + for zb0007 > 0 { + var zb0001 uint64 + var zb0002 basics.StateDelta + zb0007-- + zb0001, bts, err = msgp.ReadUint64Bytes(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "LocalDeltas") + return + } + bts, err = zb0002.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "LocalDeltas", zb0001) + return + } + (*z).LocalDeltas[zb0001] = zb0002 + } + } + if zb0005 > 0 { + zb0005-- + var zb0009 int + var zb0010 bool + zb0009, zb0010, bts, err = msgp.ReadArrayHeaderBytes(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "Logs") + return + } + if zb0009 > config.MaxLogCalls { + err = msgp.ErrOverflow(uint64(zb0009), uint64(config.MaxLogCalls)) + err = msgp.WrapError(err, "struct-from-array", "Logs") + return + } + if zb0010 { + (*z).Logs = nil + } else if (*z).Logs != nil && cap((*z).Logs) >= zb0009 { + (*z).Logs = ((*z).Logs)[:zb0009] + } else { + (*z).Logs = make([]string, zb0009) + } + for zb0003 := range (*z).Logs { + (*z).Logs[zb0003], bts, err = msgp.ReadStringBytes(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "Logs", zb0003) + return + } + } + } + if zb0005 > 0 { + zb0005-- + var zb0011 int + var zb0012 bool + zb0011, zb0012, bts, err = msgp.ReadArrayHeaderBytes(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "InnerTxns") + return + } + if zb0011 > config.MaxInnerTransactions { + err = msgp.ErrOverflow(uint64(zb0011), uint64(config.MaxInnerTransactions)) + err = msgp.WrapError(err, "struct-from-array", "InnerTxns") + return + } + if zb0012 { + (*z).InnerTxns = nil + } else if (*z).InnerTxns != nil && cap((*z).InnerTxns) >= zb0011 { + (*z).InnerTxns = ((*z).InnerTxns)[:zb0011] + } else { + (*z).InnerTxns = make([]SignedTxnWithAD, zb0011) + } + for zb0004 := range (*z).InnerTxns { + bts, err = (*z).InnerTxns[zb0004].UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "InnerTxns", zb0004) + return + } + } + } + if zb0005 > 0 { + err = msgp.ErrTooManyArrayFields(zb0005) + if err != nil { + err = msgp.WrapError(err, "struct-from-array") + return + } + } + } else { + if err != nil { + err = msgp.WrapError(err) + return + } + if zb0006 { + (*z) = EvalDelta{} + } + for zb0005 > 0 { + zb0005-- + field, bts, err = msgp.ReadMapKeyZC(bts) + if err != nil { + err = msgp.WrapError(err) + return + } + switch string(field) { + case "gd": + bts, err = (*z).GlobalDelta.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "GlobalDelta") + return + } + case "ld": + var zb0013 int + var zb0014 bool + zb0013, zb0014, bts, err = msgp.ReadMapHeaderBytes(bts) + if err != nil { + err = msgp.WrapError(err, "LocalDeltas") + return + } + if zb0013 > config.MaxEvalDeltaAccounts { + err = msgp.ErrOverflow(uint64(zb0013), uint64(config.MaxEvalDeltaAccounts)) + err = msgp.WrapError(err, "LocalDeltas") + return + } + if zb0014 { + (*z).LocalDeltas = nil + } else if (*z).LocalDeltas == nil { + (*z).LocalDeltas = make(map[uint64]basics.StateDelta, zb0013) + } + for zb0013 > 0 { + var zb0001 uint64 + var zb0002 basics.StateDelta + zb0013-- + zb0001, bts, err = msgp.ReadUint64Bytes(bts) + if err != nil { + err = msgp.WrapError(err, "LocalDeltas") + return + } + bts, err = zb0002.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "LocalDeltas", zb0001) + return + } + (*z).LocalDeltas[zb0001] = zb0002 + } + case "lg": + var zb0015 int + var zb0016 bool + zb0015, zb0016, bts, err = msgp.ReadArrayHeaderBytes(bts) + if err != nil { + err = msgp.WrapError(err, "Logs") + return + } + if zb0015 > config.MaxLogCalls { + err = msgp.ErrOverflow(uint64(zb0015), uint64(config.MaxLogCalls)) + err = msgp.WrapError(err, "Logs") + return + } + if zb0016 { + (*z).Logs = nil + } else if (*z).Logs != nil && cap((*z).Logs) >= zb0015 { + (*z).Logs = ((*z).Logs)[:zb0015] + } else { + (*z).Logs = make([]string, zb0015) + } + for zb0003 := range (*z).Logs { + (*z).Logs[zb0003], bts, err = msgp.ReadStringBytes(bts) + if err != nil { + err = msgp.WrapError(err, "Logs", zb0003) + return + } + } + case "itx": + var zb0017 int + var zb0018 bool + zb0017, zb0018, bts, err = msgp.ReadArrayHeaderBytes(bts) + if err != nil { + err = msgp.WrapError(err, "InnerTxns") + return + } + if zb0017 > config.MaxInnerTransactions { + err = msgp.ErrOverflow(uint64(zb0017), uint64(config.MaxInnerTransactions)) + err = msgp.WrapError(err, "InnerTxns") + return + } + if zb0018 { + (*z).InnerTxns = nil + } else if (*z).InnerTxns != nil && cap((*z).InnerTxns) >= zb0017 { + (*z).InnerTxns = ((*z).InnerTxns)[:zb0017] + } else { + (*z).InnerTxns = make([]SignedTxnWithAD, zb0017) + } + for zb0004 := range (*z).InnerTxns { + bts, err = (*z).InnerTxns[zb0004].UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "InnerTxns", zb0004) + return + } + } + default: + err = msgp.ErrNoField(string(field)) + if err != nil { + err = msgp.WrapError(err) + return + } + } + } + } + o = bts + return +} + +func (_ *EvalDelta) CanUnmarshalMsg(z interface{}) bool { + _, ok := (z).(*EvalDelta) + return ok +} + +// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message +func (z *EvalDelta) Msgsize() (s int) { + s = 1 + 3 + (*z).GlobalDelta.Msgsize() + 3 + msgp.MapHeaderSize + if (*z).LocalDeltas != nil { + for zb0001, zb0002 := range (*z).LocalDeltas { + _ = zb0001 + _ = zb0002 + s += 0 + msgp.Uint64Size + zb0002.Msgsize() + } + } + s += 3 + msgp.ArrayHeaderSize + for zb0003 := range (*z).Logs { + s += msgp.StringPrefixSize + len((*z).Logs[zb0003]) + } + s += 4 + msgp.ArrayHeaderSize + for zb0004 := range (*z).InnerTxns { + s += (*z).InnerTxns[zb0004].Msgsize() + } + return +} + +// MsgIsZero returns whether this is a zero value +func (z *EvalDelta) MsgIsZero() bool { + return ((*z).GlobalDelta.MsgIsZero()) && (len((*z).LocalDeltas) == 0) && (len((*z).Logs) == 0) && (len((*z).InnerTxns) == 0) +} + +// MarshalMsg implements msgp.Marshaler func (z *Header) MarshalMsg(b []byte) (o []byte) { o = msgp.Require(b, z.Msgsize()) // omitempty: check for empty values @@ -2951,60 +3366,68 @@ func (z *SignedTxn) MsgIsZero() bool { func (z *SignedTxnInBlock) MarshalMsg(b []byte) (o []byte) { o = msgp.Require(b, z.Msgsize()) // omitempty: check for empty values - zb0001Len := uint32(13) - var zb0001Mask uint32 /* 17 bits */ + zb0001Len := uint32(15) + var zb0001Mask uint32 /* 19 bits */ if (*z).SignedTxnWithAD.ApplyData.AssetClosingAmount == 0 { zb0001Len-- zb0001Mask |= 0x10 } - if (*z).SignedTxnWithAD.ApplyData.ClosingAmount.MsgIsZero() { + if (*z).SignedTxnWithAD.ApplyData.ApplicationID.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x20 } - if (*z).SignedTxnWithAD.ApplyData.EvalDelta.MsgIsZero() { + if (*z).SignedTxnWithAD.ApplyData.ClosingAmount.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x40 } - if (*z).HasGenesisHash == false { + if (*z).SignedTxnWithAD.ApplyData.ConfigAsset.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x80 } - if (*z).HasGenesisID == false { + if (*z).SignedTxnWithAD.ApplyData.EvalDelta.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x100 } - if (*z).SignedTxnWithAD.SignedTxn.Lsig.MsgIsZero() { + if (*z).HasGenesisHash == false { zb0001Len-- zb0001Mask |= 0x200 } - if (*z).SignedTxnWithAD.SignedTxn.Msig.MsgIsZero() { + if (*z).HasGenesisID == false { zb0001Len-- zb0001Mask |= 0x400 } - if (*z).SignedTxnWithAD.ApplyData.CloseRewards.MsgIsZero() { + if (*z).SignedTxnWithAD.SignedTxn.Lsig.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x800 } - if (*z).SignedTxnWithAD.ApplyData.ReceiverRewards.MsgIsZero() { + if (*z).SignedTxnWithAD.SignedTxn.Msig.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x1000 } - if (*z).SignedTxnWithAD.ApplyData.SenderRewards.MsgIsZero() { + if (*z).SignedTxnWithAD.ApplyData.CloseRewards.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x2000 } - if (*z).SignedTxnWithAD.SignedTxn.AuthAddr.MsgIsZero() { + if (*z).SignedTxnWithAD.ApplyData.ReceiverRewards.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x4000 } - if (*z).SignedTxnWithAD.SignedTxn.Sig.MsgIsZero() { + if (*z).SignedTxnWithAD.ApplyData.SenderRewards.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x8000 } - if (*z).SignedTxnWithAD.SignedTxn.Txn.MsgIsZero() { + if (*z).SignedTxnWithAD.SignedTxn.AuthAddr.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x10000 } + if (*z).SignedTxnWithAD.SignedTxn.Sig.MsgIsZero() { + zb0001Len-- + zb0001Mask |= 0x20000 + } + if (*z).SignedTxnWithAD.SignedTxn.Txn.MsgIsZero() { + zb0001Len-- + zb0001Mask |= 0x40000 + } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) if zb0001Len != 0 { @@ -3014,61 +3437,71 @@ func (z *SignedTxnInBlock) MarshalMsg(b []byte) (o []byte) { o = msgp.AppendUint64(o, (*z).SignedTxnWithAD.ApplyData.AssetClosingAmount) } if (zb0001Mask & 0x20) == 0 { // if not empty + // string "apid" + o = append(o, 0xa4, 0x61, 0x70, 0x69, 0x64) + o = (*z).SignedTxnWithAD.ApplyData.ApplicationID.MarshalMsg(o) + } + if (zb0001Mask & 0x40) == 0 { // if not empty // string "ca" o = append(o, 0xa2, 0x63, 0x61) o = (*z).SignedTxnWithAD.ApplyData.ClosingAmount.MarshalMsg(o) } - if (zb0001Mask & 0x40) == 0 { // if not empty + if (zb0001Mask & 0x80) == 0 { // if not empty + // string "caid" + o = append(o, 0xa4, 0x63, 0x61, 0x69, 0x64) + o = (*z).SignedTxnWithAD.ApplyData.ConfigAsset.MarshalMsg(o) + } + if (zb0001Mask & 0x100) == 0 { // if not empty // string "dt" o = append(o, 0xa2, 0x64, 0x74) o = (*z).SignedTxnWithAD.ApplyData.EvalDelta.MarshalMsg(o) } - if (zb0001Mask & 0x80) == 0 { // if not empty + if (zb0001Mask & 0x200) == 0 { // if not empty // string "hgh" o = append(o, 0xa3, 0x68, 0x67, 0x68) o = msgp.AppendBool(o, (*z).HasGenesisHash) } - if (zb0001Mask & 0x100) == 0 { // if not empty + if (zb0001Mask & 0x400) == 0 { // if not empty // string "hgi" o = append(o, 0xa3, 0x68, 0x67, 0x69) o = msgp.AppendBool(o, (*z).HasGenesisID) } - if (zb0001Mask & 0x200) == 0 { // if not empty + if (zb0001Mask & 0x800) == 0 { // if not empty // string "lsig" o = append(o, 0xa4, 0x6c, 0x73, 0x69, 0x67) o = (*z).SignedTxnWithAD.SignedTxn.Lsig.MarshalMsg(o) } - if (zb0001Mask & 0x400) == 0 { // if not empty + if (zb0001Mask & 0x1000) == 0 { // if not empty // string "msig" o = append(o, 0xa4, 0x6d, 0x73, 0x69, 0x67) o = (*z).SignedTxnWithAD.SignedTxn.Msig.MarshalMsg(o) } - if (zb0001Mask & 0x800) == 0 { // if not empty + if (zb0001Mask & 0x2000) == 0 { // if not empty // string "rc" o = append(o, 0xa2, 0x72, 0x63) o = (*z).SignedTxnWithAD.ApplyData.CloseRewards.MarshalMsg(o) } - if (zb0001Mask & 0x1000) == 0 { // if not empty + if (zb0001Mask & 0x4000) == 0 { // if not empty // string "rr" o = append(o, 0xa2, 0x72, 0x72) o = (*z).SignedTxnWithAD.ApplyData.ReceiverRewards.MarshalMsg(o) } - if (zb0001Mask & 0x2000) == 0 { // if not empty + if (zb0001Mask & 0x8000) == 0 { // if not empty // string "rs" o = append(o, 0xa2, 0x72, 0x73) o = (*z).SignedTxnWithAD.ApplyData.SenderRewards.MarshalMsg(o) } - if (zb0001Mask & 0x4000) == 0 { // if not empty + if (zb0001Mask & 0x10000) == 0 { // if not empty // string "sgnr" o = append(o, 0xa4, 0x73, 0x67, 0x6e, 0x72) o = (*z).SignedTxnWithAD.SignedTxn.AuthAddr.MarshalMsg(o) } - if (zb0001Mask & 0x8000) == 0 { // if not empty + if (zb0001Mask & 0x20000) == 0 { // if not empty // string "sig" o = append(o, 0xa3, 0x73, 0x69, 0x67) o = (*z).SignedTxnWithAD.SignedTxn.Sig.MarshalMsg(o) } - if (zb0001Mask & 0x10000) == 0 { // if not empty + if (zb0001Mask & 0x40000) == 0 { // if not empty // string "txn" o = append(o, 0xa3, 0x74, 0x78, 0x6e) o = (*z).SignedTxnWithAD.SignedTxn.Txn.MarshalMsg(o) @@ -3185,6 +3618,22 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { } if zb0001 > 0 { zb0001-- + bts, err = (*z).SignedTxnWithAD.ApplyData.ConfigAsset.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "ConfigAsset") + return + } + } + if zb0001 > 0 { + zb0001-- + bts, err = (*z).SignedTxnWithAD.ApplyData.ApplicationID.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "ApplicationID") + return + } + } + if zb0001 > 0 { + zb0001-- (*z).HasGenesisID, bts, err = msgp.ReadBoolBytes(bts) if err != nil { err = msgp.WrapError(err, "struct-from-array", "HasGenesisID") @@ -3288,6 +3737,18 @@ func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "EvalDelta") return } + case "caid": + bts, err = (*z).SignedTxnWithAD.ApplyData.ConfigAsset.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "ConfigAsset") + return + } + case "apid": + bts, err = (*z).SignedTxnWithAD.ApplyData.ApplicationID.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "ApplicationID") + return + } case "hgi": (*z).HasGenesisID, bts, err = msgp.ReadBoolBytes(bts) if err != nil { @@ -3320,65 +3781,73 @@ func (_ *SignedTxnInBlock) CanUnmarshalMsg(z interface{}) bool { // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message func (z *SignedTxnInBlock) Msgsize() (s int) { - s = 1 + 4 + (*z).SignedTxnWithAD.SignedTxn.Sig.Msgsize() + 5 + (*z).SignedTxnWithAD.SignedTxn.Msig.Msgsize() + 5 + (*z).SignedTxnWithAD.SignedTxn.Lsig.Msgsize() + 4 + (*z).SignedTxnWithAD.SignedTxn.Txn.Msgsize() + 5 + (*z).SignedTxnWithAD.SignedTxn.AuthAddr.Msgsize() + 3 + (*z).SignedTxnWithAD.ApplyData.ClosingAmount.Msgsize() + 4 + msgp.Uint64Size + 3 + (*z).SignedTxnWithAD.ApplyData.SenderRewards.Msgsize() + 3 + (*z).SignedTxnWithAD.ApplyData.ReceiverRewards.Msgsize() + 3 + (*z).SignedTxnWithAD.ApplyData.CloseRewards.Msgsize() + 3 + (*z).SignedTxnWithAD.ApplyData.EvalDelta.Msgsize() + 4 + msgp.BoolSize + 4 + msgp.BoolSize + s = 1 + 4 + (*z).SignedTxnWithAD.SignedTxn.Sig.Msgsize() + 5 + (*z).SignedTxnWithAD.SignedTxn.Msig.Msgsize() + 5 + (*z).SignedTxnWithAD.SignedTxn.Lsig.Msgsize() + 4 + (*z).SignedTxnWithAD.SignedTxn.Txn.Msgsize() + 5 + (*z).SignedTxnWithAD.SignedTxn.AuthAddr.Msgsize() + 3 + (*z).SignedTxnWithAD.ApplyData.ClosingAmount.Msgsize() + 4 + msgp.Uint64Size + 3 + (*z).SignedTxnWithAD.ApplyData.SenderRewards.Msgsize() + 3 + (*z).SignedTxnWithAD.ApplyData.ReceiverRewards.Msgsize() + 3 + (*z).SignedTxnWithAD.ApplyData.CloseRewards.Msgsize() + 3 + (*z).SignedTxnWithAD.ApplyData.EvalDelta.Msgsize() + 5 + (*z).SignedTxnWithAD.ApplyData.ConfigAsset.Msgsize() + 5 + (*z).SignedTxnWithAD.ApplyData.ApplicationID.Msgsize() + 4 + msgp.BoolSize + 4 + msgp.BoolSize return } // MsgIsZero returns whether this is a zero value func (z *SignedTxnInBlock) MsgIsZero() bool { - return ((*z).SignedTxnWithAD.SignedTxn.Sig.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.Msig.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.Lsig.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.Txn.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.AuthAddr.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.ClosingAmount.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.AssetClosingAmount == 0) && ((*z).SignedTxnWithAD.ApplyData.SenderRewards.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.ReceiverRewards.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.CloseRewards.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.EvalDelta.MsgIsZero()) && ((*z).HasGenesisID == false) && ((*z).HasGenesisHash == false) + return ((*z).SignedTxnWithAD.SignedTxn.Sig.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.Msig.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.Lsig.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.Txn.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.AuthAddr.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.ClosingAmount.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.AssetClosingAmount == 0) && ((*z).SignedTxnWithAD.ApplyData.SenderRewards.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.ReceiverRewards.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.CloseRewards.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.EvalDelta.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.ConfigAsset.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.ApplicationID.MsgIsZero()) && ((*z).HasGenesisID == false) && ((*z).HasGenesisHash == false) } // MarshalMsg implements msgp.Marshaler func (z *SignedTxnWithAD) MarshalMsg(b []byte) (o []byte) { o = msgp.Require(b, z.Msgsize()) // omitempty: check for empty values - zb0001Len := uint32(11) - var zb0001Mask uint16 /* 14 bits */ + zb0001Len := uint32(13) + var zb0001Mask uint16 /* 16 bits */ if (*z).ApplyData.AssetClosingAmount == 0 { zb0001Len-- zb0001Mask |= 0x8 } - if (*z).ApplyData.ClosingAmount.MsgIsZero() { + if (*z).ApplyData.ApplicationID.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x10 } - if (*z).ApplyData.EvalDelta.MsgIsZero() { + if (*z).ApplyData.ClosingAmount.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x20 } - if (*z).SignedTxn.Lsig.MsgIsZero() { + if (*z).ApplyData.ConfigAsset.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x40 } - if (*z).SignedTxn.Msig.MsgIsZero() { + if (*z).ApplyData.EvalDelta.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x80 } - if (*z).ApplyData.CloseRewards.MsgIsZero() { + if (*z).SignedTxn.Lsig.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x100 } - if (*z).ApplyData.ReceiverRewards.MsgIsZero() { + if (*z).SignedTxn.Msig.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x200 } - if (*z).ApplyData.SenderRewards.MsgIsZero() { + if (*z).ApplyData.CloseRewards.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x400 } - if (*z).SignedTxn.AuthAddr.MsgIsZero() { + if (*z).ApplyData.ReceiverRewards.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x800 } - if (*z).SignedTxn.Sig.MsgIsZero() { + if (*z).ApplyData.SenderRewards.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x1000 } - if (*z).SignedTxn.Txn.MsgIsZero() { + if (*z).SignedTxn.AuthAddr.MsgIsZero() { zb0001Len-- zb0001Mask |= 0x2000 } + if (*z).SignedTxn.Sig.MsgIsZero() { + zb0001Len-- + zb0001Mask |= 0x4000 + } + if (*z).SignedTxn.Txn.MsgIsZero() { + zb0001Len-- + zb0001Mask |= 0x8000 + } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) if zb0001Len != 0 { @@ -3388,51 +3857,61 @@ func (z *SignedTxnWithAD) MarshalMsg(b []byte) (o []byte) { o = msgp.AppendUint64(o, (*z).ApplyData.AssetClosingAmount) } if (zb0001Mask & 0x10) == 0 { // if not empty + // string "apid" + o = append(o, 0xa4, 0x61, 0x70, 0x69, 0x64) + o = (*z).ApplyData.ApplicationID.MarshalMsg(o) + } + if (zb0001Mask & 0x20) == 0 { // if not empty // string "ca" o = append(o, 0xa2, 0x63, 0x61) o = (*z).ApplyData.ClosingAmount.MarshalMsg(o) } - if (zb0001Mask & 0x20) == 0 { // if not empty + if (zb0001Mask & 0x40) == 0 { // if not empty + // string "caid" + o = append(o, 0xa4, 0x63, 0x61, 0x69, 0x64) + o = (*z).ApplyData.ConfigAsset.MarshalMsg(o) + } + if (zb0001Mask & 0x80) == 0 { // if not empty // string "dt" o = append(o, 0xa2, 0x64, 0x74) o = (*z).ApplyData.EvalDelta.MarshalMsg(o) } - if (zb0001Mask & 0x40) == 0 { // if not empty + if (zb0001Mask & 0x100) == 0 { // if not empty // string "lsig" o = append(o, 0xa4, 0x6c, 0x73, 0x69, 0x67) o = (*z).SignedTxn.Lsig.MarshalMsg(o) } - if (zb0001Mask & 0x80) == 0 { // if not empty + if (zb0001Mask & 0x200) == 0 { // if not empty // string "msig" o = append(o, 0xa4, 0x6d, 0x73, 0x69, 0x67) o = (*z).SignedTxn.Msig.MarshalMsg(o) } - if (zb0001Mask & 0x100) == 0 { // if not empty + if (zb0001Mask & 0x400) == 0 { // if not empty // string "rc" o = append(o, 0xa2, 0x72, 0x63) o = (*z).ApplyData.CloseRewards.MarshalMsg(o) } - if (zb0001Mask & 0x200) == 0 { // if not empty + if (zb0001Mask & 0x800) == 0 { // if not empty // string "rr" o = append(o, 0xa2, 0x72, 0x72) o = (*z).ApplyData.ReceiverRewards.MarshalMsg(o) } - if (zb0001Mask & 0x400) == 0 { // if not empty + if (zb0001Mask & 0x1000) == 0 { // if not empty // string "rs" o = append(o, 0xa2, 0x72, 0x73) o = (*z).ApplyData.SenderRewards.MarshalMsg(o) } - if (zb0001Mask & 0x800) == 0 { // if not empty + if (zb0001Mask & 0x2000) == 0 { // if not empty // string "sgnr" o = append(o, 0xa4, 0x73, 0x67, 0x6e, 0x72) o = (*z).SignedTxn.AuthAddr.MarshalMsg(o) } - if (zb0001Mask & 0x1000) == 0 { // if not empty + if (zb0001Mask & 0x4000) == 0 { // if not empty // string "sig" o = append(o, 0xa3, 0x73, 0x69, 0x67) o = (*z).SignedTxn.Sig.MarshalMsg(o) } - if (zb0001Mask & 0x2000) == 0 { // if not empty + if (zb0001Mask & 0x8000) == 0 { // if not empty // string "txn" o = append(o, 0xa3, 0x74, 0x78, 0x6e) o = (*z).SignedTxn.Txn.MarshalMsg(o) @@ -3548,6 +4027,22 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { } } if zb0001 > 0 { + zb0001-- + bts, err = (*z).ApplyData.ConfigAsset.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "ConfigAsset") + return + } + } + if zb0001 > 0 { + zb0001-- + bts, err = (*z).ApplyData.ApplicationID.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "struct-from-array", "ApplicationID") + return + } + } + if zb0001 > 0 { err = msgp.ErrTooManyArrayFields(zb0001) if err != nil { err = msgp.WrapError(err, "struct-from-array") @@ -3636,6 +4131,18 @@ func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "EvalDelta") return } + case "caid": + bts, err = (*z).ApplyData.ConfigAsset.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "ConfigAsset") + return + } + case "apid": + bts, err = (*z).ApplyData.ApplicationID.UnmarshalMsg(bts) + if err != nil { + err = msgp.WrapError(err, "ApplicationID") + return + } default: err = msgp.ErrNoField(string(field)) if err != nil { @@ -3656,13 +4163,13 @@ func (_ *SignedTxnWithAD) CanUnmarshalMsg(z interface{}) bool { // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message func (z *SignedTxnWithAD) Msgsize() (s int) { - s = 1 + 4 + (*z).SignedTxn.Sig.Msgsize() + 5 + (*z).SignedTxn.Msig.Msgsize() + 5 + (*z).SignedTxn.Lsig.Msgsize() + 4 + (*z).SignedTxn.Txn.Msgsize() + 5 + (*z).SignedTxn.AuthAddr.Msgsize() + 3 + (*z).ApplyData.ClosingAmount.Msgsize() + 4 + msgp.Uint64Size + 3 + (*z).ApplyData.SenderRewards.Msgsize() + 3 + (*z).ApplyData.ReceiverRewards.Msgsize() + 3 + (*z).ApplyData.CloseRewards.Msgsize() + 3 + (*z).ApplyData.EvalDelta.Msgsize() + s = 1 + 4 + (*z).SignedTxn.Sig.Msgsize() + 5 + (*z).SignedTxn.Msig.Msgsize() + 5 + (*z).SignedTxn.Lsig.Msgsize() + 4 + (*z).SignedTxn.Txn.Msgsize() + 5 + (*z).SignedTxn.AuthAddr.Msgsize() + 3 + (*z).ApplyData.ClosingAmount.Msgsize() + 4 + msgp.Uint64Size + 3 + (*z).ApplyData.SenderRewards.Msgsize() + 3 + (*z).ApplyData.ReceiverRewards.Msgsize() + 3 + (*z).ApplyData.CloseRewards.Msgsize() + 3 + (*z).ApplyData.EvalDelta.Msgsize() + 5 + (*z).ApplyData.ConfigAsset.Msgsize() + 5 + (*z).ApplyData.ApplicationID.Msgsize() return } // MsgIsZero returns whether this is a zero value func (z *SignedTxnWithAD) MsgIsZero() bool { - return ((*z).SignedTxn.Sig.MsgIsZero()) && ((*z).SignedTxn.Msig.MsgIsZero()) && ((*z).SignedTxn.Lsig.MsgIsZero()) && ((*z).SignedTxn.Txn.MsgIsZero()) && ((*z).SignedTxn.AuthAddr.MsgIsZero()) && ((*z).ApplyData.ClosingAmount.MsgIsZero()) && ((*z).ApplyData.AssetClosingAmount == 0) && ((*z).ApplyData.SenderRewards.MsgIsZero()) && ((*z).ApplyData.ReceiverRewards.MsgIsZero()) && ((*z).ApplyData.CloseRewards.MsgIsZero()) && ((*z).ApplyData.EvalDelta.MsgIsZero()) + return ((*z).SignedTxn.Sig.MsgIsZero()) && ((*z).SignedTxn.Msig.MsgIsZero()) && ((*z).SignedTxn.Lsig.MsgIsZero()) && ((*z).SignedTxn.Txn.MsgIsZero()) && ((*z).SignedTxn.AuthAddr.MsgIsZero()) && ((*z).ApplyData.ClosingAmount.MsgIsZero()) && ((*z).ApplyData.AssetClosingAmount == 0) && ((*z).ApplyData.SenderRewards.MsgIsZero()) && ((*z).ApplyData.ReceiverRewards.MsgIsZero()) && ((*z).ApplyData.CloseRewards.MsgIsZero()) && ((*z).ApplyData.EvalDelta.MsgIsZero()) && ((*z).ApplyData.ConfigAsset.MsgIsZero()) && ((*z).ApplyData.ApplicationID.MsgIsZero()) } // MarshalMsg implements msgp.Marshaler |