2020-02-24 09:14:19 -08:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
2020-08-11 04:49:45 -07:00
|
|
|
// source: cosmos/upgrade/v1beta1/upgrade.proto
|
2020-02-24 09:14:19 -08:00
|
|
|
|
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
|
|
|
fmt "fmt"
|
2020-09-30 23:21:57 -07:00
|
|
|
types "github.com/cosmos/cosmos-sdk/codec/types"
|
2020-02-24 09:14:19 -08:00
|
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
|
|
|
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
|
|
|
_ "github.com/golang/protobuf/ptypes/timestamp"
|
|
|
|
io "io"
|
|
|
|
math "math"
|
|
|
|
math_bits "math/bits"
|
|
|
|
time "time"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
var _ = time.Kitchen
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// Plan specifies information about a planned upgrade and when it should occur.
|
2020-02-24 09:14:19 -08:00
|
|
|
type Plan struct {
|
2020-09-25 03:25:37 -07:00
|
|
|
// Sets the name for the upgrade. This name will be used by the upgraded
|
|
|
|
// version of the software to apply any special "on-upgrade" commands during
|
|
|
|
// the first BeginBlock method after the upgrade is applied. It is also used
|
|
|
|
// to detect whether a software version can handle a given upgrade. If no
|
|
|
|
// upgrade handler with this name has been set in the software, it will be
|
|
|
|
// assumed that the software is out-of-date when the upgrade Time or Height is
|
|
|
|
// reached and the software will exit.
|
2020-02-24 09:14:19 -08:00
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
// The time after which the upgrade must be performed.
|
|
|
|
// Leave set to its zero value to use a pre-defined Height instead.
|
|
|
|
Time time.Time `protobuf:"bytes,2,opt,name=time,proto3,stdtime" json:"time"`
|
|
|
|
// The height at which the upgrade must be performed.
|
|
|
|
// Only used if Time is not set.
|
|
|
|
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
|
|
|
|
// Any application specific upgrade info to be included on-chain
|
|
|
|
// such as a git commit that validators could automatically upgrade to
|
|
|
|
Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
|
2020-09-30 23:21:57 -07:00
|
|
|
// IBC-enabled chains can opt-in to including the upgraded client state in its upgrade plan
|
|
|
|
// This will make the chain commit to the correct upgraded (self) client state before the upgrade occurs,
|
|
|
|
// so that connecting chains can verify that the new upgraded client is valid by verifying a proof on the
|
|
|
|
// previous version of the chain.
|
|
|
|
// This will allow IBC connections to persist smoothly across planned chain upgrades
|
|
|
|
UpgradedClientState *types.Any `protobuf:"bytes,5,opt,name=upgraded_client_state,json=upgradedClientState,proto3" json:"upgraded_client_state,omitempty" yaml:"upgraded_client_state"`
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Plan) Reset() { *m = Plan{} }
|
|
|
|
func (*Plan) ProtoMessage() {}
|
|
|
|
func (*Plan) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_ccf2a7d4d7b48dca, []int{0}
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
func (m *Plan) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *Plan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_Plan.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m *Plan) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Plan.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Plan) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *Plan) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Plan.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Plan proto.InternalMessageInfo
|
|
|
|
|
2020-09-25 03:25:37 -07:00
|
|
|
// SoftwareUpgradeProposal is a gov Content type for initiating a software
|
|
|
|
// upgrade.
|
2020-02-24 09:14:19 -08:00
|
|
|
type SoftwareUpgradeProposal struct {
|
|
|
|
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
|
|
|
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
|
|
|
Plan Plan `protobuf:"bytes,3,opt,name=plan,proto3" json:"plan"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SoftwareUpgradeProposal) Reset() { *m = SoftwareUpgradeProposal{} }
|
|
|
|
func (*SoftwareUpgradeProposal) ProtoMessage() {}
|
|
|
|
func (*SoftwareUpgradeProposal) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_ccf2a7d4d7b48dca, []int{1}
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
func (m *SoftwareUpgradeProposal) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *SoftwareUpgradeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_SoftwareUpgradeProposal.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m *SoftwareUpgradeProposal) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SoftwareUpgradeProposal.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *SoftwareUpgradeProposal) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *SoftwareUpgradeProposal) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SoftwareUpgradeProposal.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SoftwareUpgradeProposal proto.InternalMessageInfo
|
|
|
|
|
2020-09-25 03:25:37 -07:00
|
|
|
// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
|
|
|
|
// upgrade.
|
2020-02-24 09:14:19 -08:00
|
|
|
type CancelSoftwareUpgradeProposal struct {
|
|
|
|
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
|
|
|
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) Reset() { *m = CancelSoftwareUpgradeProposal{} }
|
|
|
|
func (*CancelSoftwareUpgradeProposal) ProtoMessage() {}
|
|
|
|
func (*CancelSoftwareUpgradeProposal) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_ccf2a7d4d7b48dca, []int{2}
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_CancelSoftwareUpgradeProposal.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_CancelSoftwareUpgradeProposal.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_CancelSoftwareUpgradeProposal.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_CancelSoftwareUpgradeProposal proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func init() {
|
2020-08-11 04:49:45 -07:00
|
|
|
proto.RegisterType((*Plan)(nil), "cosmos.upgrade.v1beta1.Plan")
|
|
|
|
proto.RegisterType((*SoftwareUpgradeProposal)(nil), "cosmos.upgrade.v1beta1.SoftwareUpgradeProposal")
|
|
|
|
proto.RegisterType((*CancelSoftwareUpgradeProposal)(nil), "cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterFile("cosmos/upgrade/v1beta1/upgrade.proto", fileDescriptor_ccf2a7d4d7b48dca)
|
|
|
|
}
|
|
|
|
|
|
|
|
var fileDescriptor_ccf2a7d4d7b48dca = []byte{
|
2020-09-30 23:21:57 -07:00
|
|
|
// 426 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x31, 0x6f, 0xd4, 0x30,
|
|
|
|
0x18, 0x8d, 0x69, 0x5a, 0x51, 0xdf, 0x66, 0x8e, 0x12, 0x4e, 0xc5, 0x89, 0x4e, 0x0c, 0x37, 0x80,
|
|
|
|
0xa3, 0x16, 0x09, 0xa1, 0x6e, 0xa4, 0x3b, 0xaa, 0x52, 0x58, 0x90, 0x50, 0xe5, 0x24, 0xbe, 0x9c,
|
|
|
|
0xc1, 0xb1, 0xa3, 0xd8, 0x07, 0xe4, 0x57, 0xd0, 0x9f, 0xc0, 0xcf, 0xb9, 0xb1, 0x63, 0xa7, 0x42,
|
|
|
|
0xef, 0x16, 0xe6, 0xfe, 0x02, 0x14, 0x3b, 0x41, 0x08, 0x3a, 0x76, 0xf2, 0xf7, 0x3d, 0xbd, 0xef,
|
|
|
|
0x3d, 0xfb, 0xf9, 0x83, 0x4f, 0x73, 0xa5, 0x2b, 0xa5, 0xe3, 0x65, 0x5d, 0x36, 0xb4, 0x60, 0xf1,
|
|
|
|
0xe7, 0x83, 0x8c, 0x19, 0x7a, 0x30, 0xf4, 0xa4, 0x6e, 0x94, 0x51, 0x68, 0xcf, 0xb1, 0xc8, 0x80,
|
|
|
|
0xf6, 0xac, 0xc9, 0xe3, 0x52, 0xa9, 0x52, 0xb0, 0xd8, 0xb2, 0xb2, 0xe5, 0x3c, 0xa6, 0xb2, 0x75,
|
|
|
|
0x23, 0x93, 0x71, 0xa9, 0x4a, 0x65, 0xcb, 0xb8, 0xab, 0x7a, 0x34, 0xfc, 0x77, 0xc0, 0xf0, 0x8a,
|
|
|
|
0x69, 0x43, 0xab, 0xda, 0x11, 0xa6, 0x37, 0x00, 0xfa, 0x27, 0x82, 0x4a, 0x84, 0xa0, 0x2f, 0x69,
|
|
|
|
0xc5, 0x02, 0x10, 0x81, 0xd9, 0x6e, 0x6a, 0x6b, 0xf4, 0x0a, 0xfa, 0x1d, 0x3f, 0xb8, 0x17, 0x81,
|
|
|
|
0xd9, 0xe8, 0x70, 0x42, 0x9c, 0x18, 0x19, 0xc4, 0xc8, 0xdb, 0x41, 0x2c, 0xb9, 0xbf, 0xba, 0x0a,
|
|
|
|
0xbd, 0xf3, 0x1f, 0x21, 0x48, 0xed, 0x04, 0xda, 0x83, 0x3b, 0x0b, 0xc6, 0xcb, 0x85, 0x09, 0xb6,
|
|
|
|
0x22, 0x30, 0xdb, 0x4a, 0xfb, 0xae, 0x73, 0xe1, 0x72, 0xae, 0x02, 0xdf, 0xb9, 0x74, 0x35, 0xfa,
|
|
|
|
0x08, 0x1f, 0xf6, 0xef, 0x2c, 0xce, 0x72, 0xc1, 0x99, 0x34, 0x67, 0xda, 0x50, 0xc3, 0x82, 0x6d,
|
|
|
|
0x6b, 0x3b, 0xfe, 0xcf, 0xf6, 0xb5, 0x6c, 0x93, 0xe8, 0xe6, 0x2a, 0xdc, 0x6f, 0x69, 0x25, 0x8e,
|
|
|
|
0xa6, 0xb7, 0x0e, 0x4f, 0xd3, 0x07, 0x03, 0x7e, 0x6c, 0xe1, 0xd3, 0x0e, 0x3d, 0xf2, 0x7f, 0x7d,
|
|
|
|
0x0f, 0xc1, 0xf4, 0x1b, 0x80, 0x8f, 0x4e, 0xd5, 0xdc, 0x7c, 0xa1, 0x0d, 0x7b, 0xe7, 0x58, 0x27,
|
|
|
|
0x8d, 0xaa, 0x95, 0xa6, 0x02, 0x8d, 0xe1, 0xb6, 0xe1, 0x46, 0x0c, 0x41, 0xb8, 0x06, 0x45, 0x70,
|
|
|
|
0x54, 0x30, 0x9d, 0x37, 0xbc, 0x36, 0x5c, 0x49, 0x1b, 0xc8, 0x6e, 0xfa, 0x37, 0x84, 0x5e, 0x42,
|
|
|
|
0xbf, 0x16, 0x54, 0xda, 0xf7, 0x8e, 0x0e, 0xf7, 0xc9, 0xed, 0x3f, 0x48, 0xba, 0xac, 0x13, 0xbf,
|
|
|
|
0x4b, 0x2b, 0xb5, 0xfc, 0xfe, 0x46, 0x1f, 0xe0, 0x93, 0x63, 0x2a, 0x73, 0x26, 0xee, 0xf8, 0x5a,
|
|
|
|
0x4e, 0x3e, 0x79, 0xb3, 0xba, 0xc6, 0xde, 0xe5, 0x35, 0xf6, 0x56, 0x6b, 0x0c, 0x2e, 0xd6, 0x18,
|
|
|
|
0xfc, 0x5c, 0x63, 0x70, 0xbe, 0xc1, 0xde, 0xc5, 0x06, 0x7b, 0x97, 0x1b, 0xec, 0xbd, 0x7f, 0x56,
|
|
|
|
0x72, 0xb3, 0x58, 0x66, 0x24, 0x57, 0x55, 0xdc, 0xaf, 0xa8, 0x3b, 0x9e, 0xeb, 0xe2, 0x53, 0xfc,
|
|
|
|
0xf5, 0xcf, 0xbe, 0x9a, 0xb6, 0x66, 0x3a, 0xdb, 0xb1, 0x7f, 0xf1, 0xe2, 0x77, 0x00, 0x00, 0x00,
|
|
|
|
0xff, 0xff, 0xca, 0x9e, 0x7a, 0x5d, 0xce, 0x02, 0x00, 0x00,
|
2020-03-02 13:29:10 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *Plan) Equal(that interface{}) bool {
|
|
|
|
if that == nil {
|
|
|
|
return this == nil
|
|
|
|
}
|
2020-03-02 11:10:27 -08:00
|
|
|
|
2020-03-02 13:29:10 -08:00
|
|
|
that1, ok := that.(*Plan)
|
|
|
|
if !ok {
|
|
|
|
that2, ok := that.(Plan)
|
|
|
|
if ok {
|
|
|
|
that1 = &that2
|
|
|
|
} else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if that1 == nil {
|
|
|
|
return this == nil
|
|
|
|
} else if this == nil {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if this.Name != that1.Name {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if !this.Time.Equal(that1.Time) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if this.Height != that1.Height {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if this.Info != that1.Info {
|
|
|
|
return false
|
|
|
|
}
|
2020-09-30 23:21:57 -07:00
|
|
|
if !this.UpgradedClientState.Equal(that1.UpgradedClientState) {
|
|
|
|
return false
|
|
|
|
}
|
2020-03-02 13:29:10 -08:00
|
|
|
return true
|
|
|
|
}
|
2020-03-02 11:10:27 -08:00
|
|
|
func (this *SoftwareUpgradeProposal) Equal(that interface{}) bool {
|
|
|
|
if that == nil {
|
|
|
|
return this == nil
|
|
|
|
}
|
|
|
|
|
|
|
|
that1, ok := that.(*SoftwareUpgradeProposal)
|
|
|
|
if !ok {
|
|
|
|
that2, ok := that.(SoftwareUpgradeProposal)
|
|
|
|
if ok {
|
|
|
|
that1 = &that2
|
|
|
|
} else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if that1 == nil {
|
|
|
|
return this == nil
|
|
|
|
} else if this == nil {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if this.Title != that1.Title {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if this.Description != that1.Description {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if !this.Plan.Equal(&that1.Plan) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return true
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
2020-03-02 11:10:27 -08:00
|
|
|
func (this *CancelSoftwareUpgradeProposal) Equal(that interface{}) bool {
|
|
|
|
if that == nil {
|
|
|
|
return this == nil
|
|
|
|
}
|
2020-02-24 09:14:19 -08:00
|
|
|
|
2020-03-02 11:10:27 -08:00
|
|
|
that1, ok := that.(*CancelSoftwareUpgradeProposal)
|
|
|
|
if !ok {
|
|
|
|
that2, ok := that.(CancelSoftwareUpgradeProposal)
|
|
|
|
if ok {
|
|
|
|
that1 = &that2
|
|
|
|
} else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if that1 == nil {
|
|
|
|
return this == nil
|
|
|
|
} else if this == nil {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if this.Title != that1.Title {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if this.Description != that1.Description {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return true
|
|
|
|
}
|
2020-02-24 09:14:19 -08:00
|
|
|
func (m *Plan) Marshal() (dAtA []byte, err error) {
|
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Plan) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Plan) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-09-30 23:21:57 -07:00
|
|
|
if m.UpgradedClientState != nil {
|
|
|
|
{
|
|
|
|
size, err := m.UpgradedClientState.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintUpgrade(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x2a
|
|
|
|
}
|
2020-02-24 09:14:19 -08:00
|
|
|
if len(m.Info) > 0 {
|
|
|
|
i -= len(m.Info)
|
|
|
|
copy(dAtA[i:], m.Info)
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Info)))
|
2020-02-24 09:14:19 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x22
|
|
|
|
}
|
|
|
|
if m.Height != 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintUpgrade(dAtA, i, uint64(m.Height))
|
2020-02-24 09:14:19 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x18
|
|
|
|
}
|
2020-09-30 23:21:57 -07:00
|
|
|
n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
|
|
|
|
if err2 != nil {
|
|
|
|
return 0, err2
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
2020-09-30 23:21:57 -07:00
|
|
|
i -= n2
|
|
|
|
i = encodeVarintUpgrade(dAtA, i, uint64(n2))
|
2020-02-24 09:14:19 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
if len(m.Name) > 0 {
|
|
|
|
i -= len(m.Name)
|
|
|
|
copy(dAtA[i:], m.Name)
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Name)))
|
2020-02-24 09:14:19 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SoftwareUpgradeProposal) Marshal() (dAtA []byte, err error) {
|
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SoftwareUpgradeProposal) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SoftwareUpgradeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
{
|
|
|
|
size, err := m.Plan.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintUpgrade(dAtA, i, uint64(size))
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x1a
|
|
|
|
if len(m.Description) > 0 {
|
|
|
|
i -= len(m.Description)
|
|
|
|
copy(dAtA[i:], m.Description)
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Description)))
|
2020-02-24 09:14:19 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
|
|
|
if len(m.Title) > 0 {
|
|
|
|
i -= len(m.Title)
|
|
|
|
copy(dAtA[i:], m.Title)
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Title)))
|
2020-02-24 09:14:19 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) Marshal() (dAtA []byte, err error) {
|
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Description) > 0 {
|
|
|
|
i -= len(m.Description)
|
|
|
|
copy(dAtA[i:], m.Description)
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Description)))
|
2020-02-24 09:14:19 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
|
|
|
if len(m.Title) > 0 {
|
|
|
|
i -= len(m.Title)
|
|
|
|
copy(dAtA[i:], m.Title)
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Title)))
|
2020-02-24 09:14:19 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
2020-06-18 10:04:26 -07:00
|
|
|
func encodeVarintUpgrade(dAtA []byte, offset int, v uint64) int {
|
|
|
|
offset -= sovUpgrade(v)
|
2020-02-24 09:14:19 -08:00
|
|
|
base := offset
|
|
|
|
for v >= 1<<7 {
|
|
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
|
|
v >>= 7
|
|
|
|
offset++
|
|
|
|
}
|
|
|
|
dAtA[offset] = uint8(v)
|
|
|
|
return base
|
|
|
|
}
|
|
|
|
func (m *Plan) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Name)
|
|
|
|
if l > 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovUpgrade(uint64(l))
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovUpgrade(uint64(l))
|
2020-02-24 09:14:19 -08:00
|
|
|
if m.Height != 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + sovUpgrade(uint64(m.Height))
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
l = len(m.Info)
|
|
|
|
if l > 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovUpgrade(uint64(l))
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
2020-09-30 23:21:57 -07:00
|
|
|
if m.UpgradedClientState != nil {
|
|
|
|
l = m.UpgradedClientState.Size()
|
|
|
|
n += 1 + l + sovUpgrade(uint64(l))
|
|
|
|
}
|
2020-02-24 09:14:19 -08:00
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SoftwareUpgradeProposal) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Title)
|
|
|
|
if l > 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovUpgrade(uint64(l))
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
l = len(m.Description)
|
|
|
|
if l > 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovUpgrade(uint64(l))
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
l = m.Plan.Size()
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovUpgrade(uint64(l))
|
2020-02-24 09:14:19 -08:00
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Title)
|
|
|
|
if l > 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovUpgrade(uint64(l))
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
l = len(m.Description)
|
|
|
|
if l > 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovUpgrade(uint64(l))
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
2020-06-18 10:04:26 -07:00
|
|
|
func sovUpgrade(x uint64) (n int) {
|
2020-02-24 09:14:19 -08:00
|
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
|
|
}
|
2020-06-18 10:04:26 -07:00
|
|
|
func sozUpgrade(x uint64) (n int) {
|
|
|
|
return sovUpgrade(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
func (m *Plan) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: Plan: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Plan: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
|
|
|
|
}
|
|
|
|
m.Height = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Height |= int64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 4:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Info = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
2020-09-30 23:21:57 -07:00
|
|
|
case 5:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UpgradedClientState", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowUpgrade
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthUpgrade
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthUpgrade
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if m.UpgradedClientState == nil {
|
|
|
|
m.UpgradedClientState = &types.Any{}
|
|
|
|
}
|
|
|
|
if err := m.UpgradedClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-02-24 09:14:19 -08:00
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2020-06-18 10:04:26 -07:00
|
|
|
skippy, err := skipUpgrade(dAtA[iNdEx:])
|
2020-02-24 09:14:19 -08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *SoftwareUpgradeProposal) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: SoftwareUpgradeProposal: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: SoftwareUpgradeProposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Title = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Description = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2020-06-18 10:04:26 -07:00
|
|
|
skippy, err := skipUpgrade(dAtA[iNdEx:])
|
2020-02-24 09:14:19 -08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *CancelSoftwareUpgradeProposal) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: CancelSoftwareUpgradeProposal: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: CancelSoftwareUpgradeProposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Title = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Description = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2020-06-18 10:04:26 -07:00
|
|
|
skippy, err := skipUpgrade(dAtA[iNdEx:])
|
2020-02-24 09:14:19 -08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2020-06-18 10:04:26 -07:00
|
|
|
func skipUpgrade(dAtA []byte) (n int, err error) {
|
2020-02-24 09:14:19 -08:00
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
depth := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
switch wireType {
|
|
|
|
case 0:
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx++
|
|
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 1:
|
|
|
|
iNdEx += 8
|
|
|
|
case 2:
|
|
|
|
var length int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrIntOverflowUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
length |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if length < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
iNdEx += length
|
|
|
|
case 3:
|
|
|
|
depth++
|
|
|
|
case 4:
|
|
|
|
if depth == 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrUnexpectedEndOfGroupUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
depth--
|
|
|
|
case 5:
|
|
|
|
iNdEx += 4
|
|
|
|
default:
|
|
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
|
|
}
|
|
|
|
if iNdEx < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrInvalidLengthUpgrade
|
2020-02-24 09:14:19 -08:00
|
|
|
}
|
|
|
|
if depth == 0 {
|
|
|
|
return iNdEx, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
|
|
|
|
var (
|
2020-06-18 10:04:26 -07:00
|
|
|
ErrInvalidLengthUpgrade = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
|
|
ErrIntOverflowUpgrade = fmt.Errorf("proto: integer overflow")
|
|
|
|
ErrUnexpectedEndOfGroupUpgrade = fmt.Errorf("proto: unexpected end of group")
|
2020-02-24 09:14:19 -08:00
|
|
|
)
|