// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proto/p2p/types.proto package p2p import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // 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 type NetAddress struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` IP string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` Str string `protobuf:"bytes,4,opt,name=str,proto3" json:"str,omitempty"` } func (m *NetAddress) Reset() { *m = NetAddress{} } func (m *NetAddress) String() string { return proto.CompactTextString(m) } func (*NetAddress) ProtoMessage() {} func (*NetAddress) Descriptor() ([]byte, []int) { return fileDescriptor_5c4320c1810ca85c, []int{0} } func (m *NetAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *NetAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_NetAddress.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 *NetAddress) XXX_Merge(src proto.Message) { xxx_messageInfo_NetAddress.Merge(m, src) } func (m *NetAddress) XXX_Size() int { return m.Size() } func (m *NetAddress) XXX_DiscardUnknown() { xxx_messageInfo_NetAddress.DiscardUnknown(m) } var xxx_messageInfo_NetAddress proto.InternalMessageInfo func (m *NetAddress) GetID() string { if m != nil { return m.ID } return "" } func (m *NetAddress) GetIP() string { if m != nil { return m.IP } return "" } func (m *NetAddress) GetPort() uint32 { if m != nil { return m.Port } return 0 } func (m *NetAddress) GetStr() string { if m != nil { return m.Str } return "" } type ProtocolVersion struct { P2P uint64 `protobuf:"varint,1,opt,name=p2p,proto3" json:"p2p,omitempty"` Block uint64 `protobuf:"varint,2,opt,name=block,proto3" json:"block,omitempty"` App uint64 `protobuf:"varint,3,opt,name=app,proto3" json:"app,omitempty"` } func (m *ProtocolVersion) Reset() { *m = ProtocolVersion{} } func (m *ProtocolVersion) String() string { return proto.CompactTextString(m) } func (*ProtocolVersion) ProtoMessage() {} func (*ProtocolVersion) Descriptor() ([]byte, []int) { return fileDescriptor_5c4320c1810ca85c, []int{1} } func (m *ProtocolVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ProtocolVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ProtocolVersion.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 *ProtocolVersion) XXX_Merge(src proto.Message) { xxx_messageInfo_ProtocolVersion.Merge(m, src) } func (m *ProtocolVersion) XXX_Size() int { return m.Size() } func (m *ProtocolVersion) XXX_DiscardUnknown() { xxx_messageInfo_ProtocolVersion.DiscardUnknown(m) } var xxx_messageInfo_ProtocolVersion proto.InternalMessageInfo func (m *ProtocolVersion) GetP2P() uint64 { if m != nil { return m.P2P } return 0 } func (m *ProtocolVersion) GetBlock() uint64 { if m != nil { return m.Block } return 0 } func (m *ProtocolVersion) GetApp() uint64 { if m != nil { return m.App } return 0 } type DefaultNodeInfo struct { ProtocolVersion ProtocolVersion `protobuf:"bytes,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version"` DefaultNodeID string `protobuf:"bytes,2,opt,name=default_node_id,json=defaultNodeId,proto3" json:"default_node_id,omitempty"` ListenAddr string `protobuf:"bytes,3,opt,name=listen_addr,json=listenAddr,proto3" json:"listen_addr,omitempty"` Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` Channels []byte `protobuf:"bytes,6,opt,name=channels,proto3" json:"channels,omitempty"` Moniker string `protobuf:"bytes,7,opt,name=moniker,proto3" json:"moniker,omitempty"` Other DefaultNodeInfoOther `protobuf:"bytes,8,opt,name=other,proto3" json:"other"` } func (m *DefaultNodeInfo) Reset() { *m = DefaultNodeInfo{} } func (m *DefaultNodeInfo) String() string { return proto.CompactTextString(m) } func (*DefaultNodeInfo) ProtoMessage() {} func (*DefaultNodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor_5c4320c1810ca85c, []int{2} } func (m *DefaultNodeInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DefaultNodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DefaultNodeInfo.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 *DefaultNodeInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_DefaultNodeInfo.Merge(m, src) } func (m *DefaultNodeInfo) XXX_Size() int { return m.Size() } func (m *DefaultNodeInfo) XXX_DiscardUnknown() { xxx_messageInfo_DefaultNodeInfo.DiscardUnknown(m) } var xxx_messageInfo_DefaultNodeInfo proto.InternalMessageInfo func (m *DefaultNodeInfo) GetProtocolVersion() ProtocolVersion { if m != nil { return m.ProtocolVersion } return ProtocolVersion{} } func (m *DefaultNodeInfo) GetDefaultNodeID() string { if m != nil { return m.DefaultNodeID } return "" } func (m *DefaultNodeInfo) GetListenAddr() string { if m != nil { return m.ListenAddr } return "" } func (m *DefaultNodeInfo) GetNetwork() string { if m != nil { return m.Network } return "" } func (m *DefaultNodeInfo) GetVersion() string { if m != nil { return m.Version } return "" } func (m *DefaultNodeInfo) GetChannels() []byte { if m != nil { return m.Channels } return nil } func (m *DefaultNodeInfo) GetMoniker() string { if m != nil { return m.Moniker } return "" } func (m *DefaultNodeInfo) GetOther() DefaultNodeInfoOther { if m != nil { return m.Other } return DefaultNodeInfoOther{} } type DefaultNodeInfoOther struct { TxIndex string `protobuf:"bytes,1,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` RPCAddress string `protobuf:"bytes,2,opt,name=rpc_address,json=rpcAddress,proto3" json:"rpc_address,omitempty"` } func (m *DefaultNodeInfoOther) Reset() { *m = DefaultNodeInfoOther{} } func (m *DefaultNodeInfoOther) String() string { return proto.CompactTextString(m) } func (*DefaultNodeInfoOther) ProtoMessage() {} func (*DefaultNodeInfoOther) Descriptor() ([]byte, []int) { return fileDescriptor_5c4320c1810ca85c, []int{3} } func (m *DefaultNodeInfoOther) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DefaultNodeInfoOther) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DefaultNodeInfoOther.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 *DefaultNodeInfoOther) XXX_Merge(src proto.Message) { xxx_messageInfo_DefaultNodeInfoOther.Merge(m, src) } func (m *DefaultNodeInfoOther) XXX_Size() int { return m.Size() } func (m *DefaultNodeInfoOther) XXX_DiscardUnknown() { xxx_messageInfo_DefaultNodeInfoOther.DiscardUnknown(m) } var xxx_messageInfo_DefaultNodeInfoOther proto.InternalMessageInfo func (m *DefaultNodeInfoOther) GetTxIndex() string { if m != nil { return m.TxIndex } return "" } func (m *DefaultNodeInfoOther) GetRPCAddress() string { if m != nil { return m.RPCAddress } return "" } func init() { proto.RegisterType((*NetAddress)(nil), "tendermint.p2p.NetAddress") proto.RegisterType((*ProtocolVersion)(nil), "tendermint.p2p.ProtocolVersion") proto.RegisterType((*DefaultNodeInfo)(nil), "tendermint.p2p.DefaultNodeInfo") proto.RegisterType((*DefaultNodeInfoOther)(nil), "tendermint.p2p.DefaultNodeInfoOther") } func init() { proto.RegisterFile("proto/p2p/types.proto", fileDescriptor_5c4320c1810ca85c) } var fileDescriptor_5c4320c1810ca85c = []byte{ // 493 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0x4f, 0x6f, 0xda, 0x30, 0x1c, 0x25, 0x21, 0xfc, 0xe9, 0x8f, 0x51, 0x3a, 0xab, 0x9b, 0xd2, 0x1e, 0x12, 0x84, 0xa6, 0x09, 0xed, 0x00, 0x12, 0x3b, 0xed, 0xb6, 0x31, 0x2e, 0x5c, 0xba, 0xc8, 0x9a, 0x76, 0xd8, 0x25, 0x82, 0xd8, 0x05, 0x0b, 0xb0, 0x2d, 0xc7, 0xdd, 0xe8, 0xb7, 0xd8, 0xc7, 0xea, 0xb1, 0xc7, 0x9d, 0xd0, 0x14, 0x8e, 0xfb, 0x12, 0x93, 0xed, 0xb4, 0x65, 0xa8, 0xb7, 0xf7, 0x7e, 0xfe, 0xbd, 0xbc, 0x97, 0x27, 0x1b, 0x5e, 0x49, 0x25, 0xb4, 0x18, 0xca, 0x91, 0x1c, 0xea, 0x5b, 0x49, 0xf3, 0x81, 0xe5, 0xe8, 0x54, 0x53, 0x4e, 0xa8, 0xda, 0x30, 0xae, 0x07, 0x72, 0x24, 0x2f, 0xdf, 0xea, 0x25, 0x53, 0x24, 0x95, 0x33, 0xa5, 0x6f, 0x87, 0x4e, 0xb2, 0x10, 0x0b, 0xf1, 0x84, 0x9c, 0xae, 0x37, 0x07, 0xb8, 0xa2, 0xfa, 0x13, 0x21, 0x8a, 0xe6, 0x39, 0x7a, 0x0d, 0x3e, 0x23, 0xa1, 0xd7, 0xf5, 0xfa, 0x27, 0xe3, 0x7a, 0xb1, 0x8b, 0xfd, 0xe9, 0x04, 0xfb, 0x8c, 0xd8, 0xb9, 0x0c, 0xfd, 0x83, 0x79, 0x82, 0x7d, 0x26, 0x11, 0x82, 0x40, 0x0a, 0xa5, 0xc3, 0x6a, 0xd7, 0xeb, 0xb7, 0xb1, 0xc5, 0xe8, 0x0c, 0xaa, 0xb9, 0x56, 0x61, 0x60, 0x96, 0xb1, 0x81, 0xbd, 0xaf, 0xd0, 0x49, 0x8c, 0x59, 0x26, 0xd6, 0xdf, 0xa8, 0xca, 0x99, 0xe0, 0xe8, 0x02, 0xaa, 0x72, 0x24, 0xad, 0x53, 0x30, 0x6e, 0x14, 0xbb, 0xb8, 0x9a, 0x8c, 0x12, 0x6c, 0x66, 0xe8, 0x1c, 0x6a, 0xf3, 0xb5, 0xc8, 0x56, 0xd6, 0x2e, 0xc0, 0x8e, 0x98, 0xaf, 0xce, 0xa4, 0xb4, 0x46, 0x01, 0x36, 0xb0, 0xf7, 0xd7, 0x87, 0xce, 0x84, 0x5e, 0xcf, 0x6e, 0xd6, 0xfa, 0x4a, 0x10, 0x3a, 0xe5, 0xd7, 0x02, 0x25, 0x70, 0x26, 0x4b, 0xa7, 0xf4, 0x87, 0xb3, 0xb2, 0x1e, 0xad, 0x51, 0x3c, 0xf8, 0xbf, 0xa0, 0xc1, 0x51, 0xa2, 0x71, 0x70, 0xb7, 0x8b, 0x2b, 0xb8, 0x23, 0x8f, 0x82, 0x7e, 0x80, 0x0e, 0x71, 0x26, 0x29, 0x17, 0x84, 0xa6, 0x8c, 0x94, 0x35, 0xbc, 0x2c, 0x76, 0x71, 0xfb, 0xd0, 0x7f, 0x82, 0xdb, 0xe4, 0x80, 0x12, 0x14, 0x43, 0x6b, 0xcd, 0x72, 0x4d, 0x79, 0x3a, 0x23, 0x44, 0xd9, 0xe8, 0x27, 0x18, 0xdc, 0xc8, 0x14, 0x8e, 0x42, 0x68, 0x70, 0xaa, 0x7f, 0x0a, 0xb5, 0x2a, 0xdb, 0x7a, 0xa0, 0xe6, 0xe4, 0x21, 0x7e, 0xcd, 0x9d, 0x94, 0x14, 0x5d, 0x42, 0x33, 0x5b, 0xce, 0x38, 0xa7, 0xeb, 0x3c, 0xac, 0x77, 0xbd, 0xfe, 0x0b, 0xfc, 0xc8, 0x8d, 0x6a, 0x23, 0x38, 0x5b, 0x51, 0x15, 0x36, 0x9c, 0xaa, 0xa4, 0xe8, 0x23, 0xd4, 0x84, 0x5e, 0x52, 0x15, 0x36, 0x6d, 0x19, 0x6f, 0x8e, 0xcb, 0x38, 0xea, 0xf1, 0x8b, 0xd9, 0x2d, 0x1b, 0x71, 0xc2, 0xde, 0x1c, 0xce, 0x9f, 0x5b, 0x42, 0x17, 0xd0, 0xd4, 0xdb, 0x94, 0x71, 0x42, 0xb7, 0xee, 0xde, 0xe0, 0x86, 0xde, 0x4e, 0x0d, 0x45, 0x43, 0x68, 0x29, 0x99, 0xd9, 0x9f, 0xa7, 0x79, 0x5e, 0xd6, 0x76, 0x5a, 0xec, 0x62, 0xc0, 0xc9, 0xe7, 0xf2, 0xc6, 0x61, 0x50, 0x32, 0x2b, 0xf1, 0x78, 0x72, 0x57, 0x44, 0xde, 0x7d, 0x11, 0x79, 0x7f, 0x8a, 0xc8, 0xfb, 0xb5, 0x8f, 0x2a, 0xf7, 0xfb, 0xa8, 0xf2, 0x7b, 0x1f, 0x55, 0xbe, 0xbf, 0x5b, 0x30, 0xbd, 0xbc, 0x99, 0x0f, 0x32, 0xb1, 0x19, 0x3e, 0x45, 0x3f, 0x84, 0x8f, 0xaf, 0x62, 0x5e, 0xb7, 0xf0, 0xfd, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcd, 0x9d, 0xcd, 0x35, 0x29, 0x03, 0x00, 0x00, } func (m *NetAddress) 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 *NetAddress) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *NetAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Str) > 0 { i -= len(m.Str) copy(dAtA[i:], m.Str) i = encodeVarintTypes(dAtA, i, uint64(len(m.Str))) i-- dAtA[i] = 0x22 } if m.Port != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Port)) i-- dAtA[i] = 0x18 } if len(m.IP) > 0 { i -= len(m.IP) copy(dAtA[i:], m.IP) i = encodeVarintTypes(dAtA, i, uint64(len(m.IP))) i-- dAtA[i] = 0x12 } if len(m.ID) > 0 { i -= len(m.ID) copy(dAtA[i:], m.ID) i = encodeVarintTypes(dAtA, i, uint64(len(m.ID))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ProtocolVersion) 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 *ProtocolVersion) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ProtocolVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.App != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.App)) i-- dAtA[i] = 0x18 } if m.Block != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Block)) i-- dAtA[i] = 0x10 } if m.P2P != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.P2P)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *DefaultNodeInfo) 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 *DefaultNodeInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DefaultNodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Other.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 if len(m.Moniker) > 0 { i -= len(m.Moniker) copy(dAtA[i:], m.Moniker) i = encodeVarintTypes(dAtA, i, uint64(len(m.Moniker))) i-- dAtA[i] = 0x3a } if len(m.Channels) > 0 { i -= len(m.Channels) copy(dAtA[i:], m.Channels) i = encodeVarintTypes(dAtA, i, uint64(len(m.Channels))) i-- dAtA[i] = 0x32 } if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) i = encodeVarintTypes(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x2a } if len(m.Network) > 0 { i -= len(m.Network) copy(dAtA[i:], m.Network) i = encodeVarintTypes(dAtA, i, uint64(len(m.Network))) i-- dAtA[i] = 0x22 } if len(m.ListenAddr) > 0 { i -= len(m.ListenAddr) copy(dAtA[i:], m.ListenAddr) i = encodeVarintTypes(dAtA, i, uint64(len(m.ListenAddr))) i-- dAtA[i] = 0x1a } if len(m.DefaultNodeID) > 0 { i -= len(m.DefaultNodeID) copy(dAtA[i:], m.DefaultNodeID) i = encodeVarintTypes(dAtA, i, uint64(len(m.DefaultNodeID))) i-- dAtA[i] = 0x12 } { size, err := m.ProtocolVersion.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *DefaultNodeInfoOther) 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 *DefaultNodeInfoOther) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DefaultNodeInfoOther) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.RPCAddress) > 0 { i -= len(m.RPCAddress) copy(dAtA[i:], m.RPCAddress) i = encodeVarintTypes(dAtA, i, uint64(len(m.RPCAddress))) i-- dAtA[i] = 0x12 } if len(m.TxIndex) > 0 { i -= len(m.TxIndex) copy(dAtA[i:], m.TxIndex) i = encodeVarintTypes(dAtA, i, uint64(len(m.TxIndex))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *NetAddress) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.IP) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } if m.Port != 0 { n += 1 + sovTypes(uint64(m.Port)) } l = len(m.Str) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } func (m *ProtocolVersion) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.P2P != 0 { n += 1 + sovTypes(uint64(m.P2P)) } if m.Block != 0 { n += 1 + sovTypes(uint64(m.Block)) } if m.App != 0 { n += 1 + sovTypes(uint64(m.App)) } return n } func (m *DefaultNodeInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ProtocolVersion.Size() n += 1 + l + sovTypes(uint64(l)) l = len(m.DefaultNodeID) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.ListenAddr) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.Network) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.Version) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.Channels) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.Moniker) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = m.Other.Size() n += 1 + l + sovTypes(uint64(l)) return n } func (m *DefaultNodeInfoOther) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.TxIndex) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.RPCAddress) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozTypes(x uint64) (n int) { return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *NetAddress) 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 { return ErrIntOverflowTypes } 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: NetAddress: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: NetAddress: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.IP = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) } m.Port = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Port |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Str = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ProtocolVersion) 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 { return ErrIntOverflowTypes } 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: ProtocolVersion: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ProtocolVersion: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field P2P", wireType) } m.P2P = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.P2P |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) } m.Block = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Block |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field App", wireType) } m.App = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.App |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DefaultNodeInfo) 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 { return ErrIntOverflowTypes } 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: DefaultNodeInfo: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DefaultNodeInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtocolVersion", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ProtocolVersion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DefaultNodeID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.DefaultNodeID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListenAddr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.ListenAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Network = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Channels", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Channels = append(m.Channels[:0], dAtA[iNdEx:postIndex]...) if m.Channels == nil { m.Channels = []byte{} } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Moniker = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Other.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DefaultNodeInfoOther) 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 { return ErrIntOverflowTypes } 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: DefaultNodeInfoOther: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DefaultNodeInfoOther: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.TxIndex = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RPCAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 { return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.RPCAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTypes } 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 { return 0, ErrIntOverflowTypes } 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 { return 0, ErrIntOverflowTypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLengthTypes } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupTypes } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthTypes } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )