// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: base/types/gfspp2p/p2p.proto

package gfspp2p

import (
	fmt "fmt"
	proto "github.com/cosmos/gogoproto/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

// Ping defines the heartbeat request between p2p nodes
type GfSpPing struct {
	// sp_operator_address define sp operator public key
	SpOperatorAddress string `protobuf:"bytes,1,opt,name=sp_operator_address,json=spOperatorAddress,proto3" json:"sp_operator_address,omitempty"`
	// signature define the signature of sp sign the msg
	Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (m *GfSpPing) Reset()         { *m = GfSpPing{} }
func (m *GfSpPing) String() string { return proto.CompactTextString(m) }
func (*GfSpPing) ProtoMessage()    {}
func (*GfSpPing) Descriptor() ([]byte, []int) {
	return fileDescriptor_30ddc63483f8c481, []int{0}
}
func (m *GfSpPing) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GfSpPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GfSpPing.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 *GfSpPing) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GfSpPing.Merge(m, src)
}
func (m *GfSpPing) XXX_Size() int {
	return m.Size()
}
func (m *GfSpPing) XXX_DiscardUnknown() {
	xxx_messageInfo_GfSpPing.DiscardUnknown(m)
}

var xxx_messageInfo_GfSpPing proto.InternalMessageInfo

func (m *GfSpPing) GetSpOperatorAddress() string {
	if m != nil {
		return m.SpOperatorAddress
	}
	return ""
}

func (m *GfSpPing) GetSignature() []byte {
	if m != nil {
		return m.Signature
	}
	return nil
}

// Node defines the p2p node info
type GfSpNode struct {
	// node_id defines the node id
	NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// multi_addr define the node multi addr
	MultiAddr []string `protobuf:"bytes,2,rep,name=multi_addr,json=multiAddr,proto3" json:"multi_addr,omitempty"`
}

func (m *GfSpNode) Reset()         { *m = GfSpNode{} }
func (m *GfSpNode) String() string { return proto.CompactTextString(m) }
func (*GfSpNode) ProtoMessage()    {}
func (*GfSpNode) Descriptor() ([]byte, []int) {
	return fileDescriptor_30ddc63483f8c481, []int{1}
}
func (m *GfSpNode) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GfSpNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GfSpNode.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 *GfSpNode) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GfSpNode.Merge(m, src)
}
func (m *GfSpNode) XXX_Size() int {
	return m.Size()
}
func (m *GfSpNode) XXX_DiscardUnknown() {
	xxx_messageInfo_GfSpNode.DiscardUnknown(m)
}

var xxx_messageInfo_GfSpNode proto.InternalMessageInfo

func (m *GfSpNode) GetNodeId() string {
	if m != nil {
		return m.NodeId
	}
	return ""
}

func (m *GfSpNode) GetMultiAddr() []string {
	if m != nil {
		return m.MultiAddr
	}
	return nil
}

// Pong defines the heartbeat response between p2p nodes
type GfSpPong struct {
	// nodes define the
	Nodes []*GfSpNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// sp_operator_address define sp operator public key
	SpOperatorAddress string `protobuf:"bytes,2,opt,name=sp_operator_address,json=spOperatorAddress,proto3" json:"sp_operator_address,omitempty"`
	// signature define the signature of sp sign the msg
	Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
}

func (m *GfSpPong) Reset()         { *m = GfSpPong{} }
func (m *GfSpPong) String() string { return proto.CompactTextString(m) }
func (*GfSpPong) ProtoMessage()    {}
func (*GfSpPong) Descriptor() ([]byte, []int) {
	return fileDescriptor_30ddc63483f8c481, []int{2}
}
func (m *GfSpPong) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GfSpPong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GfSpPong.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 *GfSpPong) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GfSpPong.Merge(m, src)
}
func (m *GfSpPong) XXX_Size() int {
	return m.Size()
}
func (m *GfSpPong) XXX_DiscardUnknown() {
	xxx_messageInfo_GfSpPong.DiscardUnknown(m)
}

var xxx_messageInfo_GfSpPong proto.InternalMessageInfo

func (m *GfSpPong) GetNodes() []*GfSpNode {
	if m != nil {
		return m.Nodes
	}
	return nil
}

func (m *GfSpPong) GetSpOperatorAddress() string {
	if m != nil {
		return m.SpOperatorAddress
	}
	return ""
}

func (m *GfSpPong) GetSignature() []byte {
	if m != nil {
		return m.Signature
	}
	return nil
}

func init() {
	proto.RegisterType((*GfSpPing)(nil), "base.types.gfspp2p.GfSpPing")
	proto.RegisterType((*GfSpNode)(nil), "base.types.gfspp2p.GfSpNode")
	proto.RegisterType((*GfSpPong)(nil), "base.types.gfspp2p.GfSpPong")
}

func init() { proto.RegisterFile("base/types/gfspp2p/p2p.proto", fileDescriptor_30ddc63483f8c481) }

var fileDescriptor_30ddc63483f8c481 = []byte{
	// 305 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcf, 0x4a, 0x03, 0x31,
	0x10, 0x87, 0x9b, 0x16, 0xab, 0x1b, 0xbd, 0x18, 0x0f, 0xf6, 0x50, 0x97, 0xd2, 0xd3, 0x5e, 0x9a,
	0x85, 0xf5, 0x09, 0xac, 0x07, 0xf1, 0xa2, 0xb2, 0x5e, 0x44, 0x90, 0x92, 0x6d, 0xa6, 0x69, 0xa0,
	0x4d, 0x86, 0x24, 0x15, 0x7c, 0x07, 0x0f, 0x3e, 0x96, 0xc7, 0x1e, 0x3d, 0x4a, 0xfb, 0x22, 0xb2,
	0x7f, 0x44, 0xb0, 0x08, 0x1e, 0x33, 0x5f, 0x66, 0x7e, 0xf3, 0x31, 0xb4, 0x5f, 0x08, 0x0f, 0x69,
	0x78, 0x41, 0xf0, 0xa9, 0x9a, 0x79, 0xc4, 0x0c, 0x53, 0xcc, 0x90, 0xa3, 0xb3, 0xc1, 0x32, 0x56,
	0x52, 0x5e, 0x51, 0xde, 0xd0, 0xe1, 0x03, 0x3d, 0xb8, 0x9a, 0xdd, 0xe3, 0x9d, 0x36, 0x8a, 0x71,
	0x7a, 0xe2, 0x71, 0x62, 0x11, 0x9c, 0x08, 0xd6, 0x4d, 0x84, 0x94, 0x0e, 0xbc, 0xef, 0x91, 0x01,
	0x49, 0xa2, 0xfc, 0xd8, 0xe3, 0x6d, 0x43, 0x2e, 0x6a, 0xc0, 0xfa, 0x34, 0xf2, 0x5a, 0x19, 0x11,
	0x56, 0x0e, 0x7a, 0xed, 0x01, 0x49, 0x8e, 0xf2, 0x9f, 0xc2, 0x70, 0x5c, 0x4f, 0xbe, 0xb1, 0x12,
	0xd8, 0x29, 0xdd, 0x37, 0x56, 0xc2, 0x44, 0xcb, 0x66, 0x5a, 0xb7, 0x7c, 0x5e, 0x4b, 0x76, 0x46,
	0xe9, 0x72, 0xb5, 0x08, 0xba, 0x0a, 0xeb, 0xb5, 0x07, 0x9d, 0x24, 0xca, 0xa3, 0xaa, 0x52, 0x86,
	0x0c, 0x5f, 0x49, 0xb3, 0x9e, 0x35, 0x8a, 0x65, 0x74, 0xaf, 0xec, 0x2a, 0x17, 0xea, 0x24, 0x87,
	0x59, 0x9f, 0xef, 0xea, 0xf0, 0xef, 0xc4, 0xbc, 0xfe, 0xfa, 0x97, 0x52, 0xfb, 0x5f, 0x4a, 0x9d,
	0x5f, 0x4a, 0xe3, 0xa7, 0xf7, 0x4d, 0x4c, 0xd6, 0x9b, 0x98, 0x7c, 0x6e, 0x62, 0xf2, 0xb6, 0x8d,
	0x5b, 0xeb, 0x6d, 0xdc, 0xfa, 0xd8, 0xc6, 0xad, 0xc7, 0x4b, 0xa5, 0xc3, 0x7c, 0x55, 0xf0, 0xa9,
	0x5d, 0xa6, 0x85, 0x29, 0x46, 0xd3, 0xb9, 0xd0, 0x26, 0x55, 0x0e, 0xc0, 0xcc, 0x34, 0x2c, 0xe4,
	0xc8, 0x07, 0xeb, 0x84, 0x82, 0x11, 0x3a, 0xfb, 0xac, 0x25, 0xb8, 0x74, 0xf7, 0x52, 0x45, 0xb7,
	0x3a, 0xd3, 0xf9, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x05, 0x98, 0x4c, 0xc2, 0xc6, 0x01, 0x00,
	0x00,
}

func (m *GfSpPing) 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 *GfSpPing) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *GfSpPing) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Signature) > 0 {
		i -= len(m.Signature)
		copy(dAtA[i:], m.Signature)
		i = encodeVarintP2P(dAtA, i, uint64(len(m.Signature)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.SpOperatorAddress) > 0 {
		i -= len(m.SpOperatorAddress)
		copy(dAtA[i:], m.SpOperatorAddress)
		i = encodeVarintP2P(dAtA, i, uint64(len(m.SpOperatorAddress)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *GfSpNode) 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 *GfSpNode) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *GfSpNode) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.MultiAddr) > 0 {
		for iNdEx := len(m.MultiAddr) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.MultiAddr[iNdEx])
			copy(dAtA[i:], m.MultiAddr[iNdEx])
			i = encodeVarintP2P(dAtA, i, uint64(len(m.MultiAddr[iNdEx])))
			i--
			dAtA[i] = 0x12
		}
	}
	if len(m.NodeId) > 0 {
		i -= len(m.NodeId)
		copy(dAtA[i:], m.NodeId)
		i = encodeVarintP2P(dAtA, i, uint64(len(m.NodeId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *GfSpPong) 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 *GfSpPong) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *GfSpPong) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Signature) > 0 {
		i -= len(m.Signature)
		copy(dAtA[i:], m.Signature)
		i = encodeVarintP2P(dAtA, i, uint64(len(m.Signature)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.SpOperatorAddress) > 0 {
		i -= len(m.SpOperatorAddress)
		copy(dAtA[i:], m.SpOperatorAddress)
		i = encodeVarintP2P(dAtA, i, uint64(len(m.SpOperatorAddress)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Nodes) > 0 {
		for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintP2P(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func encodeVarintP2P(dAtA []byte, offset int, v uint64) int {
	offset -= sovP2P(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *GfSpPing) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.SpOperatorAddress)
	if l > 0 {
		n += 1 + l + sovP2P(uint64(l))
	}
	l = len(m.Signature)
	if l > 0 {
		n += 1 + l + sovP2P(uint64(l))
	}
	return n
}

func (m *GfSpNode) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.NodeId)
	if l > 0 {
		n += 1 + l + sovP2P(uint64(l))
	}
	if len(m.MultiAddr) > 0 {
		for _, s := range m.MultiAddr {
			l = len(s)
			n += 1 + l + sovP2P(uint64(l))
		}
	}
	return n
}

func (m *GfSpPong) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.Nodes) > 0 {
		for _, e := range m.Nodes {
			l = e.Size()
			n += 1 + l + sovP2P(uint64(l))
		}
	}
	l = len(m.SpOperatorAddress)
	if l > 0 {
		n += 1 + l + sovP2P(uint64(l))
	}
	l = len(m.Signature)
	if l > 0 {
		n += 1 + l + sovP2P(uint64(l))
	}
	return n
}

func sovP2P(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozP2P(x uint64) (n int) {
	return sovP2P(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GfSpPing) 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 ErrIntOverflowP2P
			}
			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: GfSpPing: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GfSpPing: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SpOperatorAddress", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowP2P
				}
				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 ErrInvalidLengthP2P
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthP2P
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.SpOperatorAddress = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowP2P
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthP2P
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthP2P
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
			if m.Signature == nil {
				m.Signature = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipP2P(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthP2P
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *GfSpNode) 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 ErrIntOverflowP2P
			}
			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: GfSpNode: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GfSpNode: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowP2P
				}
				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 ErrInvalidLengthP2P
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthP2P
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.NodeId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field MultiAddr", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowP2P
				}
				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 ErrInvalidLengthP2P
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthP2P
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.MultiAddr = append(m.MultiAddr, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipP2P(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthP2P
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *GfSpPong) 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 ErrIntOverflowP2P
			}
			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: GfSpPong: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GfSpPong: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowP2P
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthP2P
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthP2P
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Nodes = append(m.Nodes, &GfSpNode{})
			if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SpOperatorAddress", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowP2P
				}
				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 ErrInvalidLengthP2P
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthP2P
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.SpOperatorAddress = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowP2P
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthP2P
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthP2P
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
			if m.Signature == nil {
				m.Signature = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipP2P(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthP2P
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipP2P(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, ErrIntOverflowP2P
			}
			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, ErrIntOverflowP2P
				}
				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, ErrIntOverflowP2P
				}
				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, ErrInvalidLengthP2P
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupP2P
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthP2P
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthP2P        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowP2P          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupP2P = fmt.Errorf("proto: unexpected end of group")
)
