@ -7,6 +7,7 @@ import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
keys "github.com/tendermint/tendermint/proto/crypto/keys"
io "io"
math "math"
math_bits "math/bits"
@ -253,38 +254,96 @@ func (*Packet) XXX_OneofWrappers() []interface{} {
}
}
type AuthSigMessage struct {
PubKey keys . PublicKey ` protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key" `
Sig [ ] byte ` protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty" `
}
func ( m * AuthSigMessage ) Reset ( ) { * m = AuthSigMessage { } }
func ( m * AuthSigMessage ) String ( ) string { return proto . CompactTextString ( m ) }
func ( * AuthSigMessage ) ProtoMessage ( ) { }
func ( * AuthSigMessage ) Descriptor ( ) ( [ ] byte , [ ] int ) {
return fileDescriptor_8c680f0b24d73fe7 , [ ] int { 4 }
}
func ( m * AuthSigMessage ) XXX_Unmarshal ( b [ ] byte ) error {
return m . Unmarshal ( b )
}
func ( m * AuthSigMessage ) XXX_Marshal ( b [ ] byte , deterministic bool ) ( [ ] byte , error ) {
if deterministic {
return xxx_messageInfo_AuthSigMessage . 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 * AuthSigMessage ) XXX_Merge ( src proto . Message ) {
xxx_messageInfo_AuthSigMessage . Merge ( m , src )
}
func ( m * AuthSigMessage ) XXX_Size ( ) int {
return m . Size ( )
}
func ( m * AuthSigMessage ) XXX_DiscardUnknown ( ) {
xxx_messageInfo_AuthSigMessage . DiscardUnknown ( m )
}
var xxx_messageInfo_AuthSigMessage proto . InternalMessageInfo
func ( m * AuthSigMessage ) GetPubKey ( ) keys . PublicKey {
if m != nil {
return m . PubKey
}
return keys . PublicKey { }
}
func ( m * AuthSigMessage ) GetSig ( ) [ ] byte {
if m != nil {
return m . Sig
}
return nil
}
func init ( ) {
proto . RegisterType ( ( * PacketPing ) ( nil ) , "tendermint.proto.p2p.PacketPing" )
proto . RegisterType ( ( * PacketPong ) ( nil ) , "tendermint.proto.p2p.PacketPong" )
proto . RegisterType ( ( * PacketMsg ) ( nil ) , "tendermint.proto.p2p.PacketMsg" )
proto . RegisterType ( ( * Packet ) ( nil ) , "tendermint.proto.p2p.Packet" )
proto . RegisterType ( ( * AuthSigMessage ) ( nil ) , "tendermint.proto.p2p.AuthSigMessage" )
}
func init ( ) { proto . RegisterFile ( "proto/p2p/conn_msgs.proto" , fileDescriptor_8c680f0b24d73fe7 ) }
var fileDescriptor_8c680f0b24d73fe7 = [ ] byte {
// 324 bytes of a gzipped FileDescriptorProto
0x1f , 0x8b , 0x08 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x02 , 0xff , 0x84 , 0x91 , 0x41 , 0x4b , 0xfb , 0x30 ,
0x18 , 0xc6 , 0x9b , 0x7f , 0xff , 0x9b , 0xf4 , 0xdd , 0xbc , 0x04 , 0x0f , 0x9b , 0x87 , 0x6c , 0xec , 0x20 ,
0x43 , 0xa4 , 0x85 , 0xfa , 0x05 , 0x64 , 0x9b , 0xe2 , 0x0e , 0xc3 , 0xd1 , 0xa3 , 0x97 , 0xd2 , 0xb5 , 0x35 ,
0x0d , 0xda , 0x24 , 0xb4 , 0xd9 , 0xc1 , 0x6f , 0xe1 , 0xc7 , 0xf2 , 0xb8 , 0xa3 , 0x20 , 0x0c , 0xe9 , 0xbe ,
0x88 , 0x2c , 0x99 , 0x5b , 0x05 , 0xd1 , 0xdb , 0xf3 , 0x3c , 0xbc , 0xf9 , 0xbd , 0x4f , 0x12 , 0xe8 , 0xca ,
0x42 , 0x28 , 0xe1 , 0x49 , 0x5f , 0x7a , 0xb1 , 0xe0 , 0x3c , 0xcc , 0x4b , 0x5a , 0xba , 0x3a , 0xc3 , 0x27 ,
0x2a , 0xe5 , 0x49 , 0x5a , 0xe4 , 0x8c , 0x2b , 0x93 , 0xb8 , 0xd2 , 0x97 , 0xa7 , 0x67 , 0x2a , 0x63 , 0x45 ,
0x12 , 0xca , 0xa8 , 0x50 , 0xcf , 0x9e , 0x39 , 0x4c , 0x05 , 0x15 , 0x07 , 0x65 , 0x66 , 0x07 , 0x6d , 0x80 ,
0x79 , 0x14 , 0x3f , 0xa6 , 0x6a , 0xce , 0x38 , 0xad , 0x39 , 0xc1 , 0xe9 , 0x20 , 0x03 , 0xc7 , 0xb8 , 0x59 ,
0x49 , 0xf1 , 0x05 , 0x40 , 0x9c , 0x45 , 0x9c , 0xa7 , 0x4f , 0x21 , 0x4b , 0x3a , 0xa8 , 0x8f , 0x86 , 0x8d ,
0xd1 , 0x71 , 0xb5 , 0xee , 0x39 , 0x63 , 0x93 , 0x4e , 0x27 , 0x81 , 0xb3 , 0x1b , 0x98 , 0x26 , 0xb8 , 0x0b ,
0x76 , 0x2a , 0x1e , 0x3a , 0xff , 0xf4 , 0xd8 , 0x51 , 0xb5 , 0xee , 0xd9 , 0xd7 , 0x77 , 0x37 , 0xc1 , 0x36 ,
0xc3 , 0x18 , 0xfe , 0x27 , 0x91 , 0x8a , 0x3a , 0x76 , 0x1f , 0x0d , 0xdb , 0x81 , 0xd6 , 0x83 , 0x77 , 0x04 ,
0x4d , 0xb3 , 0x0a , 0x8f , 0xa1 , 0x25 , 0xb5 , 0x0a , 0x25 , 0xe3 , 0x54 , 0x2f , 0x6a , 0xf9 , 0x7d , 0xf7 ,
0xa7 , 0x4b , 0xba , 0x87 , 0xe6 , 0xb7 , 0x56 , 0x00 , 0x72 , 0xef , 0xea , 0x10 , 0xc1 , 0xa9 , 0xae , 0xf1 ,
0x17 , 0x44 , 0x7c , 0x83 , 0x08 , 0x4e , 0xf1 , 0x15 , 0xec , 0xdc , 0xf6 , 0xb5 , 0x75 , 0xdd , 0x96 , 0xdf ,
0xfb , 0x8d , 0x31 , 0x2b , 0xb7 , 0x08 , 0x47 , 0x7e , 0x99 , 0x51 , 0x03 , 0xec , 0x72 , 0x99 , 0x8f , 0x26 ,
0xaf , 0x15 , 0x41 , 0xab , 0x8a , 0xa0 , 0x8f , 0x8a , 0xa0 , 0x97 , 0x0d , 0xb1 , 0x56 , 0x1b , 0x62 , 0xbd ,
0x6d , 0x88 , 0x75 , 0x7f , 0x4e , 0x99 , 0xca , 0x96 , 0x0b , 0x37 , 0x16 , 0xb9 , 0x77 , 0x00 , 0xd7 , 0xe5 ,
0xfe , 0xdf , 0x17 , 0x4d , 0x2d , 0x2f , 0x3f , 0x03 , 0x00 , 0x00 , 0xff , 0xff , 0xad , 0x8c , 0xf9 , 0x97 ,
0x0b , 0x02 , 0x00 , 0x00 ,
// 409 bytes of a gzipped FileDescriptorProto
0x1f , 0x8b , 0x08 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x02 , 0xff , 0x84 , 0x92 , 0xdf , 0x6a , 0xd4 , 0x40 ,
0x14 , 0xc6 , 0x13 , 0xd3 , 0x6e , 0xd9 , 0xb3 , 0xab , 0xc8 , 0xe0 , 0xc5 , 0xb6 , 0x60 , 0x76 , 0xc9 , 0x85 ,
0x16 , 0x91 , 0x04 , 0xe2 , 0x0b , 0x68 , 0x5a , 0x8b , 0xa5 , 0x2c , 0x2e , 0xf1 , 0xce , 0x9b , 0x90 , 0x3f ,
0xe3 , 0x64 , 0xdc , 0x66 , 0x66 , 0xc8 , 0x4c , 0x2e , 0xf2 , 0x16 , 0x3e , 0x56 , 0x2f , 0x7b , 0x29 , 0x08 ,
0x8b , 0x64 , 0x5f , 0x44 , 0x32 , 0x13 , 0x77 , 0x57 , 0x14 , 0x7b , 0xf7 , 0x7d , 0x1f , 0x27 , 0xbf , 0x73 ,
0x4e , 0xce , 0xc0 , 0xa9 , 0xa8 , 0xb9 , 0xe2 , 0x81 , 0x08 , 0x45 , 0x90 , 0x73 , 0xc6 , 0x92 , 0x4a , 0x12 ,
0xe9 , 0xeb , 0x0c , 0x3d , 0x53 , 0x98 , 0x15 , 0xb8 , 0xae , 0x28 , 0x53 , 0x26 , 0xf1 , 0x45 , 0x28 , 0xce ,
0x5e , 0xa8 , 0x92 , 0xd6 , 0x45 , 0x22 , 0xd2 , 0x5a , 0xb5 , 0x81 , 0xf9 , 0x98 , 0x70 , 0xc2 , 0xf7 , 0xca ,
0xd4 , 0x9e , 0x3d , 0x37 , 0x49 , 0x5e , 0xb7 , 0x42 , 0xf1 , 0x60 , 0x8d , 0x5b , 0x19 , 0xa8 , 0x56 , 0xe0 ,
0x01 , 0xee , 0x4d , 0x01 , 0x56 , 0x69 , 0xbe , 0xc6 , 0x6a , 0x45 , 0x19 , 0x39 , 0x70 , 0x9c , 0x11 , 0xaf ,
0x84 , 0xb1 , 0x71 , 0x4b , 0x49 , 0xd0 , 0x6b , 0x80 , 0xbc , 0x4c , 0x19 , 0xc3 , 0xb7 , 0x09 , 0x2d , 0x66 ,
0xf6 , 0xc2 , 0x3e , 0x3f , 0x8e , 0x1e , 0x77 , 0x9b , 0xf9 , 0xf8 , 0xc2 , 0xa4 , 0xd7 , 0x97 , 0xf1 , 0x78 ,
0x28 , 0xb8 , 0x2e , 0xd0 , 0x29 , 0x38 , 0x98 , 0x7f , 0x99 , 0x3d , 0xd2 , 0x65 , 0x27 , 0xdd , 0x66 , 0xee ,
0xbc , 0xff , 0x78 , 0x15 , 0xf7 , 0x19 , 0x42 , 0x70 , 0x54 , 0xa4 , 0x2a , 0x9d , 0x39 , 0x0b , 0xfb , 0x7c ,
0x1a , 0x6b , 0xed , 0xfd , 0xb0 , 0x61 , 0x64 , 0x5a , 0xa1 , 0x0b , 0x98 , 0x08 , 0xad , 0x12 , 0x41 , 0x19 ,
0xd1 , 0x8d , 0x26 , 0xe1 , 0xc2 , 0xff , 0xd7 , 0x3f , 0xf0 , 0xf7 , 0x93 , 0x7f , 0xb0 , 0x62 , 0x10 , 0x3b ,
0x77 , 0x08 , 0xe1 , 0x8c , 0xe8 , 0x31 , 0x1e , 0x82 , 0xf0 , 0x3f , 0x20 , 0x9c , 0x11 , 0xf4 , 0x16 , 0x06 ,
0xd7 , 0x1f , 0x43 , 0x8f , 0x3b , 0x09 , 0xe7 , 0xff , 0x63 , 0x2c , 0x65 , 0x8f , 0x18 , 0x8b , 0xdf , 0x26 ,
0x3a , 0x06 , 0x47 , 0x36 , 0x95 , 0xf7 , 0x15 , 0x9e , 0xbc , 0x6b , 0x54 , 0xf9 , 0x89 , 0x92 , 0x25 , 0x96 ,
0x32 , 0x25 , 0x18 , 0x5d , 0xc1 , 0x89 , 0x68 , 0xb2 , 0x64 , 0x8d , 0xdb , 0x61 , 0xc1 , 0x97 , 0x7f , 0x73 ,
0xcd , 0xc5 , 0xfc , 0xfe , 0x62 , 0xfe , 0xaa , 0xc9 , 0x6e , 0x69 , 0x7e , 0x83 , 0xdb , 0xe8 , 0xe8 , 0x6e ,
0x33 , 0xb7 , 0xe2 , 0x91 , 0x68 , 0xb2 , 0x1b , 0xdc , 0xa2 , 0xa7 , 0xe0 , 0x48 , 0x6a , 0xf6 , 0x9b , 0xc6 ,
0xbd , 0x8c , 0x2e , 0xef , 0x3a , 0xd7 , 0xbe , 0xef , 0x5c , 0xfb , 0x67 , 0xe7 , 0xda , 0xdf , 0xb6 , 0xae ,
0x75 , 0xbf , 0x75 , 0xad , 0xef , 0x5b , 0xd7 , 0xfa , 0xfc , 0x8a , 0x50 , 0x55 , 0x36 , 0x99 , 0x9f , 0xf3 ,
0x2a , 0xd8 , 0x37 , 0x3b , 0x94 , 0xbb , 0x27 , 0x98 , 0x8d , 0xb4 , 0x7c , 0xf3 , 0x2b , 0x00 , 0x00 , 0xff ,
0xff , 0xd2 , 0xaa , 0xb3 , 0xc0 , 0x96 , 0x02 , 0x00 , 0x00 ,
}
func ( m * PacketPing ) Marshal ( ) ( dAtA [ ] byte , err error ) {
@ -468,6 +527,46 @@ func (m *Packet_PacketMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) {
}
return len ( dAtA ) - i , nil
}
func ( m * AuthSigMessage ) 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 * AuthSigMessage ) MarshalTo ( dAtA [ ] byte ) ( int , error ) {
size := m . Size ( )
return m . MarshalToSizedBuffer ( dAtA [ : size ] )
}
func ( m * AuthSigMessage ) MarshalToSizedBuffer ( dAtA [ ] byte ) ( int , error ) {
i := len ( dAtA )
_ = i
var l int
_ = l
if len ( m . Sig ) > 0 {
i -= len ( m . Sig )
copy ( dAtA [ i : ] , m . Sig )
i = encodeVarintConnMsgs ( dAtA , i , uint64 ( len ( m . Sig ) ) )
i --
dAtA [ i ] = 0x12
}
{
size , err := m . PubKey . MarshalToSizedBuffer ( dAtA [ : i ] )
if err != nil {
return 0 , err
}
i -= size
i = encodeVarintConnMsgs ( dAtA , i , uint64 ( size ) )
}
i --
dAtA [ i ] = 0xa
return len ( dAtA ) - i , nil
}
func encodeVarintConnMsgs ( dAtA [ ] byte , offset int , v uint64 ) int {
offset -= sovConnMsgs ( v )
base := offset
@ -564,6 +663,20 @@ func (m *Packet_PacketMsg) Size() (n int) {
}
return n
}
func ( m * AuthSigMessage ) Size ( ) ( n int ) {
if m == nil {
return 0
}
var l int
_ = l
l = m . PubKey . Size ( )
n += 1 + l + sovConnMsgs ( uint64 ( l ) )
l = len ( m . Sig )
if l > 0 {
n += 1 + l + sovConnMsgs ( uint64 ( l ) )
}
return n
}
func sovConnMsgs ( x uint64 ) ( n int ) {
return ( math_bits . Len64 ( x | 1 ) + 6 ) / 7
@ -960,6 +1073,126 @@ func (m *Packet) Unmarshal(dAtA []byte) error {
}
return nil
}
func ( m * AuthSigMessage ) 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 ErrIntOverflowConnMsgs
}
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: AuthSigMessage: wiretype end group for non-group" )
}
if fieldNum <= 0 {
return fmt . Errorf ( "proto: AuthSigMessage: illegal tag %d (wire type %d)" , fieldNum , wire )
}
switch fieldNum {
case 1 :
if wireType != 2 {
return fmt . Errorf ( "proto: wrong wireType = %d for field PubKey" , wireType )
}
var msglen int
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
msglen |= int ( b & 0x7F ) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConnMsgs
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConnMsgs
}
if postIndex > l {
return io . ErrUnexpectedEOF
}
if err := m . PubKey . Unmarshal ( dAtA [ iNdEx : postIndex ] ) ; err != nil {
return err
}
iNdEx = postIndex
case 2 :
if wireType != 2 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Sig" , wireType )
}
var byteLen int
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
byteLen |= int ( b & 0x7F ) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConnMsgs
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConnMsgs
}
if postIndex > l {
return io . ErrUnexpectedEOF
}
m . Sig = append ( m . Sig [ : 0 ] , dAtA [ iNdEx : postIndex ] ... )
if m . Sig == nil {
m . Sig = [ ] byte { }
}
iNdEx = postIndex
default :
iNdEx = preIndex
skippy , err := skipConnMsgs ( dAtA [ iNdEx : ] )
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthConnMsgs
}
if ( iNdEx + skippy ) < 0 {
return ErrInvalidLengthConnMsgs
}
if ( iNdEx + skippy ) > l {
return io . ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io . ErrUnexpectedEOF
}
return nil
}
func skipConnMsgs ( dAtA [ ] byte ) ( n int , err error ) {
l := len ( dAtA )
iNdEx := 0