@ -4,11 +4,12 @@
package types
import (
encoding_binary "encoding/binary"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/gogo/protobuf/types"
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
_ "github.com/golang/protobuf/ptypes/timestamp"
io "io"
math "math"
math_bits "math/bits"
@ -80,8 +81,8 @@ func (m *CanonicalBlockID) GetPartsHeader() CanonicalPartSetHeader {
}
type CanonicalPartSetHeader struct {
Hash [ ] byte ` protobuf:"bytes,1,opt,name=hash,proto3" json:"hash ,omitempty"`
Total uint32 ` protobuf:"varint,2,opt,name=total,proto3" json:"total ,omitempty"`
Total uint32 ` protobuf:"varint,1,opt,name=total,proto3" json:"total ,omitempty"`
Hash [ ] byte ` protobuf:"bytes,2,opt,name=hash,proto3" json:"hash ,omitempty"`
}
func ( m * CanonicalPartSetHeader ) Reset ( ) { * m = CanonicalPartSetHeader { } }
@ -117,28 +118,28 @@ func (m *CanonicalPartSetHeader) XXX_DiscardUnknown() {
var xxx_messageInfo_CanonicalPartSetHeader proto . InternalMessageInfo
func ( m * CanonicalPartSetHeader ) GetHash ( ) [ ] byte {
func ( m * CanonicalPartSetHeader ) GetTotal ( ) uint32 {
if m != nil {
return m . Hash
return m . Total
}
return nil
return 0
}
func ( m * CanonicalPartSetHeader ) GetTotal ( ) uint32 {
func ( m * CanonicalPartSetHeader ) GetHash ( ) [ ] byte {
if m != nil {
return m . Total
return m . Hash
}
return 0
return nil
}
type CanonicalProposal struct {
Type SignedMsgType ` protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty" `
Height int64 ` protobuf:"varint ,2,opt,name=height,proto3" json:"height,omitempty" binary:" fixed64 " `
Round int64 ` protobuf:"varint ,3,opt,name=round,proto3" json:"round,omitempty" binary:" fixed64 " `
POLRound int64 ` protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty" `
BlockID CanonicalBlockID ` protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id" `
Timestamp time . Time ` protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp" `
ChainID string ` protobuf:"bytes,7,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" `
Type SignedMsgType ` protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty" `
Height int64 ` protobuf:"fixed64 ,2,opt,name=height,proto3" json:"height,omitempty" `
Round int64 ` protobuf:"fixed64 ,3,opt,name=round,proto3" json:"round,omitempty" `
POLRound int64 ` protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty" `
BlockID * CanonicalBlockID ` protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty " `
Timestamp time . Time ` protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp" `
ChainID string ` protobuf:"bytes,7,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" `
}
func ( m * CanonicalProposal ) Reset ( ) { * m = CanonicalProposal { } }
@ -202,11 +203,11 @@ func (m *CanonicalProposal) GetPOLRound() int64 {
return 0
}
func ( m * CanonicalProposal ) GetBlockID ( ) CanonicalBlockID {
func ( m * CanonicalProposal ) GetBlockID ( ) * CanonicalBlockID {
if m != nil {
return m . BlockID
}
return CanonicalBlockID { }
return nil
}
func ( m * CanonicalProposal ) GetTimestamp ( ) time . Time {
@ -224,12 +225,12 @@ func (m *CanonicalProposal) GetChainID() string {
}
type CanonicalVote struct {
Type SignedMsgType ` protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty" `
Height int64 ` protobuf:"varint ,2,opt,name=height,proto3" json:"height,omitempty" binary:" fixed64 " `
Round int64 ` protobuf:"varint ,3,opt,name=round,proto3" json:"round,omitempty" binary:" fixed64 " `
BlockID CanonicalBlockID ` protobuf:"bytes,5 ,opt,name=block_id,json=blockId,proto3" json:"block_id" `
Timestamp time . Time ` protobuf:"bytes,6 ,opt,name=timestamp,proto3,stdtime" json:"timestamp" `
ChainID string ` protobuf:"bytes,7 ,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" `
Type SignedMsgType ` protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty" `
Height int64 ` protobuf:"fixed64 ,2,opt,name=height,proto3" json:"height,omitempty" `
Round int64 ` protobuf:"fixed64 ,3,opt,name=round,proto3" json:"round,omitempty" `
BlockID * CanonicalBlockID ` protobuf:"bytes,4 ,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty " `
Timestamp time . Time ` protobuf:"bytes,5 ,opt,name=timestamp,proto3,stdtime" json:"timestamp" `
ChainID string ` protobuf:"bytes,6 ,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" `
}
func ( m * CanonicalVote ) Reset ( ) { * m = CanonicalVote { } }
@ -286,11 +287,11 @@ func (m *CanonicalVote) GetRound() int64 {
return 0
}
func ( m * CanonicalVote ) GetBlockID ( ) CanonicalBlockID {
func ( m * CanonicalVote ) GetBlockID ( ) * CanonicalBlockID {
if m != nil {
return m . BlockID
}
return CanonicalBlockID { }
return nil
}
func ( m * CanonicalVote ) GetTimestamp ( ) time . Time {
@ -317,39 +318,38 @@ func init() {
func init ( ) { proto . RegisterFile ( "proto/types/canonical.proto" , fileDescriptor_3f9b1d584b46f180 ) }
var fileDescriptor_3f9b1d584b46f180 = [ ] byte {
// 506 bytes of a gzipped FileDescriptorProto
0x1f , 0x8b , 0x08 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x02 , 0xff , 0xd4 , 0x54 , 0x4d , 0x8b , 0xd3 , 0x40 ,
0x18 , 0x6e , 0xb6 , 0x5f , 0xe9 , 0xb4 , 0xeb , 0xc7 , 0x20 , 0x35 , 0x54 , 0x48 , 0x42 , 0xc0 , 0xa5 , 0xc2 ,
0x32 , 0x81 , 0x55 , 0x04 , 0x3d , 0x66 , 0x45 , 0x2c , 0x28 , 0x2e , 0xd9 , 0xa2 , 0xe0 , 0xa5 , 0x4c , 0x92 ,
0xd9 , 0x64 , 0x30 , 0xcd , 0x84 , 0x64 , 0x0a , 0xf6 , 0xe4 , 0x5f , 0xd8 , 0xab , 0xff , 0x68 , 0x8f , 0x3d ,
0x7a , 0xaa , 0x92 , 0xde , 0x3c , 0xfa , 0x0b , 0x64 , 0x66 , 0xfa , 0x75 , 0xa8 , 0x7a , 0xd5 , 0x4b , 0x79 ,
0xe7 , 0x99 , 0xe7 , 0x79 , 0xde , 0xa7 , 0xef , 0xbc , 0x04 , 0x3c , 0xc8 , 0x0b , 0xc6 , 0x99 , 0xcb , 0xe7 ,
0x39 , 0x29 , 0xdd , 0x10 , 0x67 , 0x2c , 0xa3 , 0x21 , 0x4e , 0x91 , 0x44 , 0x61 , 0x9f , 0x93 , 0x2c , 0x22 ,
0xc5 , 0x94 , 0x66 , 0x5c , 0x21 , 0x48 , 0xf2 , 0x06 , 0x27 , 0x3c , 0xa1 , 0x45 , 0x34 , 0xc9 , 0x71 , 0xc1 ,
0xe7 , 0xae , 0x32 , 0x88 , 0x59 , 0xcc , 0x76 , 0x95 , 0x62 , 0x0f , 0xee , 0xef , 0x9b , 0xcb , 0xdf , 0xf5 ,
0x85 , 0x15 , 0x33 , 0x16 , 0xa7 , 0x44 , 0x69 , 0x83 , 0xd9 , 0x95 , 0xcb , 0xe9 , 0x94 , 0x94 , 0x1c , 0x4f ,
0x73 , 0x45 , 0x70 , 0x3e , 0x83 , 0x3b , 0xe7 , 0x9b , 0x30 , 0x5e , 0xca , 0xc2 , 0x8f , 0xa3 , 0x17 , 0x10 ,
0x82 , 0x46 , 0x82 , 0xcb , 0xc4 , 0xd0 , 0x6c , 0x6d , 0xd8 , 0xf3 , 0x65 , 0x0d , 0xdf , 0x83 , 0x9e , 0x48 ,
0x51 , 0x4e , 0x12 , 0x82 , 0x23 , 0x52 , 0x18 , 0x47 , 0xb6 , 0x36 , 0xec , 0x9e , 0x21 , 0x74 , 0x38 , 0x38 ,
0xda , 0x7a , 0x5e , 0xe0 , 0x82 , 0x5f , 0x12 , 0xfe , 0x4a , 0xaa , 0xbc , 0xc6 , 0xcd , 0xd2 , 0xaa , 0xf9 ,
0x5d , 0xe9 , 0xa4 , 0x20 , 0xc7 , 0x03 , 0xfd , 0xc3 , 0xe4 , 0x83 , 0x31 , 0xee , 0x81 , 0x26 , 0x67 , 0x1c ,
0xa7 , 0xb2 , 0xff , 0xb1 , 0xaf , 0x0e , 0xce , 0x97 , 0x3a , 0xb8 , 0xbb , 0x33 , 0x29 , 0x58 , 0xce , 0x4a ,
0x9c , 0xc2 , 0x67 , 0xa0 , 0x21 , 0xc2 , 0x48 , 0xfd , 0xad , 0xb3 , 0x87 , 0xbf , 0x8b , 0x7a , 0x49 , 0xe3 ,
0x8c , 0x44 , 0x6f , 0xca , 0x78 , 0x3c , 0xcf , 0x89 , 0x2f , 0x25 , 0x10 , 0x81 , 0x56 , 0x42 , 0x68 , 0x9c ,
0x70 , 0xd9 , 0xa7 , 0xee , 0xf5 , 0x7f , 0x2e , 0x2d , 0x18 , 0xd0 , 0x0c , 0x17 , 0xf3 , 0xe7 , 0x8e , 0x7d ,
0x45 , 0x3f , 0x91 , 0xe8 , 0xe9 , 0x13 , 0xdb , 0xf1 , 0xd7 , 0x2c , 0x78 , 0x0a , 0x9a , 0x05 , 0x9b , 0x65 ,
0x91 , 0x51 , 0xff , 0x23 , 0x5d , 0x91 , 0xe0 , 0x23 , 0xd0 , 0xc9 , 0x59 , 0x3a , 0x51 , 0x8a , 0x86 , 0x54 ,
0xf4 , 0xaa , 0xa5 , 0xa5 , 0x5f , 0xbc , 0x7d , 0xed , 0x0b , 0xcc , 0xd7 , 0x73 , 0x96 , 0xca , 0x0a , 0x8e ,
0x81 , 0x1e , 0x88 , 0x57 , 0x99 , 0xd0 , 0xc8 , 0x68 , 0xca , 0x91 , 0x0f , 0xff , 0x3a , 0xf2 , 0xf5 , 0x33 ,
0x7a , 0xb7 , 0xc5 , 0xb0 , 0xab , 0xa5 , 0xd5 , 0x5e , 0x03 , 0x7e , 0x5b , 0x5a , 0x8d , 0x22 , 0xe8 , 0x81 ,
0xce , 0x76 , 0x0f , 0x8c , 0x96 , 0xb4 , 0x1d , 0x20 , 0xb5 , 0x29 , 0x68 , 0xb3 , 0x29 , 0x68 , 0xbc , 0x61 ,
0x78 , 0xba , 0x30 , 0xba , 0xfe , 0x66 , 0x69 , 0xfe , 0x4e , 0x06 , 0x4f , 0x80 , 0x1e , 0x26 , 0x98 , 0x66 ,
0x22 , 0x59 , 0xdb , 0xd6 , 0x86 , 0x1d , 0xaf , 0x2b , 0x7a , 0x9d , 0x0b , 0x4c , 0xf4 , 0x92 , 0x97 , 0xa3 ,
0xc8 , 0xf9 , 0x71 , 0x04 , 0x8e , 0xb7 , 0xd1 , 0xde , 0x31 , 0x4e , 0xfe , 0xdd , 0x77 , 0xf9 , 0xef , 0x87 ,
0xed , 0xbd , 0xbc , 0xa9 , 0x4c , 0x6d , 0x51 , 0x99 , 0xda , 0xf7 , 0xca , 0xd4 , 0xae , 0x57 , 0x66 , 0x6d ,
0xb1 , 0x32 , 0x6b , 0x5f , 0x57 , 0x66 , 0xed , 0xc3 , 0x69 , 0x4c , 0x79 , 0x32 , 0x0b , 0x50 , 0xc8 , 0xa6 ,
0xee , 0xee , 0x3f , 0xed , 0x97 , 0x7b , 0x9f , 0x90 , 0xa0 , 0x25 , 0x0f , 0x8f , 0x7f , 0x05 , 0x00 , 0x00 ,
0xff , 0xff , 0x79 , 0xf8 , 0x2b , 0x08 , 0xb5 , 0x04 , 0x00 , 0x00 ,
// 493 bytes of a gzipped FileDescriptorProto
0x1f , 0x8b , 0x08 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x02 , 0xff , 0xbc , 0x53 , 0x41 , 0x8b , 0xd3 , 0x40 ,
0x14 , 0x6e , 0xba , 0x69 , 0x9b , 0x4e , 0xbb , 0xb2 , 0x0e , 0x52 , 0x43 , 0x85 , 0xa4 , 0x14 , 0x5c , 0x22 ,
0xc8 , 0x04 , 0xd6 , 0x93 , 0xd7 , 0xac , 0x88 , 0x05 , 0xc5 , 0x32 , 0xbb , 0x28 , 0x78 , 0x29 , 0xd3 , 0x64 ,
0x4c , 0x06 , 0xd3 , 0x4c , 0x48 , 0xa6 , 0x87 , 0x9e , 0xfc , 0x0b , 0xfb , 0x6b , 0xfc , 0x0d , 0x7b , 0xdc ,
0xa3 , 0xa7 , 0x2a , 0x29 , 0xfe , 0x0f , 0x99 , 0x99 , 0xb6 , 0xe9 , 0x61 , 0x8b , 0x07 , 0xc5 , 0x4b , 0x78 ,
0xef , 0x7b , 0xef , 0x7d , 0xef , 0xcb , 0xf7 , 0x18 , 0xf0 , 0x24 , 0x2f , 0xb8 , 0xe0 , 0xbe , 0x58 , 0xe5 ,
0xb4 , 0xf4 , 0x43 , 0x92 , 0xf1 , 0x8c , 0x85 , 0x24 , 0x45 , 0x0a , 0x85 , 0x03 , 0x41 , 0xb3 , 0x88 , 0x16 ,
0x0b , 0x96 , 0x09 , 0x8d , 0x20 , 0xd5 , 0x37 , 0x3c , 0x17 , 0x09 , 0x2b , 0xa2 , 0x59 , 0x4e , 0x0a , 0xb1 ,
0xf2 , 0x35 , 0x41 , 0xcc , 0x63 , 0x5e , 0x47 , 0xba , 0x7b , 0xf8 , 0xf8 , 0x90 , 0x5c , 0x7d , 0xb7 , 0x05 ,
0x37 , 0xe6 , 0x3c , 0x4e , 0xa9 , 0x9e , 0x9d , 0x2f , 0x3f , 0xfb , 0x82 , 0x2d , 0x68 , 0x29 , 0xc8 , 0x22 ,
0xd7 , 0x0d , 0xe3 , 0xaf , 0xe0 , 0xec , 0x72 , 0x27 , 0x26 , 0x48 , 0x79 , 0xf8 , 0x65 , 0xf2 , 0x0a , 0x42 ,
0x60 , 0x26 , 0xa4 , 0x4c , 0x6c , 0x63 , 0x64 , 0x78 , 0x7d , 0xac , 0x62 , 0xf8 , 0x11 , 0xf4 , 0xa5 , 0x8a ,
0x72 , 0x96 , 0x50 , 0x12 , 0xd1 , 0xc2 , 0x6e , 0x8e , 0x0c , 0xaf , 0x77 , 0x81 , 0xd0 , 0xfd , 0xc2 , 0xd1 ,
0x9e , 0x73 , 0x4a , 0x0a , 0x71 , 0x45 , 0xc5 , 0x1b , 0x35 , 0x15 , 0x98 , 0xb7 , 0x6b , 0xb7 , 0x81 , 0x7b ,
0x8a , 0x49 , 0x43 , 0xe3 , 0x00 , 0x0c , 0xee , 0x6f , 0x86 , 0x8f , 0x40 , 0x4b , 0x70 , 0x41 , 0x52 , 0xa5 ,
0xe3 , 0x14 , 0xeb , 0x64 , 0x2f , 0xae , 0x59 , 0x8b , 0x1b , 0xff , 0x6a , 0x82 , 0x87 , 0x35 , 0x49 , 0xc1 ,
0x73 , 0x5e , 0x92 , 0x14 , 0xbe , 0x04 , 0xa6 , 0x14 , 0xa3 , 0xc6 , 0x1f , 0x5c , 0x3c , 0x3d , 0x26 , 0xf5 ,
0x8a , 0xc5 , 0x19 , 0x8d , 0xde , 0x95 , 0xf1 , 0xf5 , 0x2a , 0xa7 , 0x58 , 0x8d , 0xc0 , 0x01 , 0x68 , 0x27 ,
0x94 , 0xc5 , 0x89 , 0x50 , 0x6b , 0xce , 0xf0 , 0x36 , 0x93 , 0x92 , 0x0a , 0xbe , 0xcc , 0x22 , 0xfb , 0x44 ,
0xc1 , 0x3a , 0x81 , 0xcf , 0x40 , 0x37 , 0xe7 , 0xe9 , 0x4c , 0x57 , 0xcc , 0x91 , 0xe1 , 0x9d , 0x04 , 0xfd ,
0x6a , 0xed , 0x5a , 0xd3 , 0xf7 , 0x6f , 0xb1 , 0xc4 , 0xb0 , 0x95 , 0xf3 , 0x54 , 0x45 , 0x70 , 0x0a , 0xac ,
0xb9 , 0x74 , 0x79 , 0xc6 , 0x22 , 0xbb , 0xa5 , 0x2c , 0xf4 , 0xfe , 0x68 , 0xe1 , 0xf6 , 0x2c , 0x41 , 0xaf ,
0x5a , 0xbb , 0x9d , 0x6d , 0x82 , 0x3b , 0x8a , 0x66 , 0x12 , 0xc1 , 0x00 , 0x74 , 0xf7 , 0x37 , 0xb5 , 0xdb ,
0x8a , 0x72 , 0x88 , 0xf4 , 0xd5 , 0xd1 , 0xee , 0xea , 0xe8 , 0x7a , 0xd7 , 0x11 , 0x58 , 0xf2 , 0x02 , 0x37 ,
0x3f , 0x5c , 0x03 , 0xd7 , 0x63 , 0xf0 , 0x1c , 0x58 , 0x61 , 0x42 , 0x58 , 0x26 , 0x55 , 0x75 , 0x46 , 0x86 ,
0xd7 , 0xd5 , 0xbb , 0x2e , 0x25 , 0x26 , 0x77 , 0xa9 , 0xe2 , 0x24 , 0x1a , 0x7f , 0x6b , 0x82 , 0xd3 , 0xbd ,
0xac , 0x0f , 0x5c , 0xd0 , 0xff , 0xe7 , 0xf1 , 0xa1 , 0x71 , 0xe6 , 0xbf , 0x37 , 0xae , 0xf5 , 0xf7 , 0xc6 ,
0xb5 , 0x8f , 0x1b , 0x17 , 0xbc , 0xbe , 0xad , 0x1c , 0xe3 , 0xae , 0x72 , 0x8c , 0x9f , 0x95 , 0x63 , 0xdc ,
0x6c , 0x9c , 0xc6 , 0xdd , 0xc6 , 0x69 , 0x7c , 0xdf , 0x38 , 0x8d , 0x4f , 0xcf , 0x63 , 0x26 , 0x92 , 0xe5 ,
0x1c , 0x85 , 0x7c , 0xe1 , 0xd7 , 0xff , 0x73 , 0x18 , 0x1e , 0x3c , 0xed , 0x79 , 0x5b , 0x25 , 0x2f , 0x7e ,
0x07 , 0x00 , 0x00 , 0xff , 0xff , 0xfa , 0xd1 , 0x62 , 0xe9 , 0x4d , 0x04 , 0x00 , 0x00 ,
}
func ( m * CanonicalBlockID ) Marshal ( ) ( dAtA [ ] byte , err error ) {
@ -412,17 +412,17 @@ func (m *CanonicalPartSetHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
_ = i
var l int
_ = l
if m . Total != 0 {
i = encodeVarintCanonical ( dAtA , i , uint64 ( m . Total ) )
i --
dAtA [ i ] = 0x10
}
if len ( m . Hash ) > 0 {
i -= len ( m . Hash )
copy ( dAtA [ i : ] , m . Hash )
i = encodeVarintCanonical ( dAtA , i , uint64 ( len ( m . Hash ) ) )
i --
dAtA [ i ] = 0xa
dAtA [ i ] = 0x12
}
if m . Total != 0 {
i = encodeVarintCanonical ( dAtA , i , uint64 ( m . Total ) )
i --
dAtA [ i ] = 0x8
}
return len ( dAtA ) - i , nil
}
@ -462,30 +462,34 @@ func (m *CanonicalProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintCanonical ( dAtA , i , uint64 ( n2 ) )
i --
dAtA [ i ] = 0x32
{
size , err := m . BlockID . MarshalToSizedBuffer ( dAtA [ : i ] )
if err != nil {
return 0 , err
if m . BlockID != nil {
{
size , err := m . BlockID . MarshalToSizedBuffer ( dAtA [ : i ] )
if err != nil {
return 0 , err
}
i -= size
i = encodeVarintCanonical ( dAtA , i , uint64 ( size ) )
}
i -= size
i = encodeVarintCanonical ( dAtA , i , uint64 ( size ) )
i --
dAtA [ i ] = 0x2a
}
i --
dAtA [ i ] = 0x2a
if m . POLRound != 0 {
i = encodeVarintCanonical ( dAtA , i , uint64 ( m . POLRound ) )
i --
dAtA [ i ] = 0x20
}
if m . Round != 0 {
i = encodeVarintCanonical ( dAtA , i , uint64 ( m . Round ) )
i -= 8
encoding_binary . LittleEndian . PutUint64 ( dAtA [ i : ] , uint64 ( m . Round ) )
i --
dAtA [ i ] = 0x18
dAtA [ i ] = 0x19
}
if m . Height != 0 {
i = encodeVarintCanonical ( dAtA , i , uint64 ( m . Height ) )
i -= 8
encoding_binary . LittleEndian . PutUint64 ( dAtA [ i : ] , uint64 ( m . Height ) )
i --
dAtA [ i ] = 0x10
dAtA [ i ] = 0x11
}
if m . Type != 0 {
i = encodeVarintCanonical ( dAtA , i , uint64 ( m . Type ) )
@ -520,7 +524,7 @@ func (m *CanonicalVote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
copy ( dAtA [ i : ] , m . ChainID )
i = encodeVarintCanonical ( dAtA , i , uint64 ( len ( m . ChainID ) ) )
i --
dAtA [ i ] = 0x3a
dAtA [ i ] = 0x32
}
n4 , err4 := github_com_gogo_protobuf_types . StdTimeMarshalTo ( m . Timestamp , dAtA [ i - github_com_gogo_protobuf_types . SizeOfStdTime ( m . Timestamp ) : ] )
if err4 != nil {
@ -529,26 +533,30 @@ func (m *CanonicalVote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= n4
i = encodeVarintCanonical ( dAtA , i , uint64 ( n4 ) )
i --
dAtA [ i ] = 0x32
{
size , err := m . BlockID . MarshalToSizedBuffer ( dAtA [ : i ] )
if err != nil {
return 0 , err
dAtA [ i ] = 0x2a
if m . BlockID != nil {
{
size , err := m . BlockID . MarshalToSizedBuffer ( dAtA [ : i ] )
if err != nil {
return 0 , err
}
i -= size
i = encodeVarintCanonical ( dAtA , i , uint64 ( size ) )
}
i -= size
i = encodeVarintCanonical ( dAtA , i , uint64 ( size ) )
i --
dAtA [ i ] = 0x22
}
i --
dAtA [ i ] = 0x2a
if m . Round != 0 {
i = encodeVarintCanonical ( dAtA , i , uint64 ( m . Round ) )
i -= 8
encoding_binary . LittleEndian . PutUint64 ( dAtA [ i : ] , uint64 ( m . Round ) )
i --
dAtA [ i ] = 0x18
dAtA [ i ] = 0x19
}
if m . Height != 0 {
i = encodeVarintCanonical ( dAtA , i , uint64 ( m . Height ) )
i -= 8
encoding_binary . LittleEndian . PutUint64 ( dAtA [ i : ] , uint64 ( m . Height ) )
i --
dAtA [ i ] = 0x10
dAtA [ i ] = 0x11
}
if m . Type != 0 {
i = encodeVarintCanonical ( dAtA , i , uint64 ( m . Type ) )
@ -590,13 +598,13 @@ func (m *CanonicalPartSetHeader) Size() (n int) {
}
var l int
_ = l
if m . Total != 0 {
n += 1 + sovCanonical ( uint64 ( m . Total ) )
}
l = len ( m . Hash )
if l > 0 {
n += 1 + l + sovCanonical ( uint64 ( l ) )
}
if m . Total != 0 {
n += 1 + sovCanonical ( uint64 ( m . Total ) )
}
return n
}
@ -610,16 +618,18 @@ func (m *CanonicalProposal) Size() (n int) {
n += 1 + sovCanonical ( uint64 ( m . Type ) )
}
if m . Height != 0 {
n += 1 + sovCanonical ( uint64 ( m . Height ) )
n += 9
}
if m . Round != 0 {
n += 1 + sovCanonical ( uint64 ( m . Round ) )
n += 9
}
if m . POLRound != 0 {
n += 1 + sovCanonical ( uint64 ( m . POLRound ) )
}
l = m . BlockID . Size ( )
n += 1 + l + sovCanonical ( uint64 ( l ) )
if m . BlockID != nil {
l = m . BlockID . Size ( )
n += 1 + l + sovCanonical ( uint64 ( l ) )
}
l = github_com_gogo_protobuf_types . SizeOfStdTime ( m . Timestamp )
n += 1 + l + sovCanonical ( uint64 ( l ) )
l = len ( m . ChainID )
@ -639,13 +649,15 @@ func (m *CanonicalVote) Size() (n int) {
n += 1 + sovCanonical ( uint64 ( m . Type ) )
}
if m . Height != 0 {
n += 1 + sovCanonical ( uint64 ( m . Height ) )
n += 9
}
if m . Round != 0 {
n += 1 + sovCanonical ( uint64 ( m . Round ) )
n += 9
}
if m . BlockID != nil {
l = m . BlockID . Size ( )
n += 1 + l + sovCanonical ( uint64 ( l ) )
}
l = m . BlockID . Size ( )
n += 1 + l + sovCanonical ( uint64 ( l ) )
l = github_com_gogo_protobuf_types . SizeOfStdTime ( m . Timestamp )
n += 1 + l + sovCanonical ( uint64 ( l ) )
l = len ( m . ChainID )
@ -811,6 +823,25 @@ func (m *CanonicalPartSetHeader) Unmarshal(dAtA []byte) error {
}
switch fieldNum {
case 1 :
if wireType != 0 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Total" , wireType )
}
m . Total = 0
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanonical
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
m . Total |= uint32 ( b & 0x7F ) << shift
if b < 0x80 {
break
}
}
case 2 :
if wireType != 2 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Hash" , wireType )
}
@ -844,25 +875,6 @@ func (m *CanonicalPartSetHeader) Unmarshal(dAtA []byte) error {
m . Hash = [ ] byte { }
}
iNdEx = postIndex
case 2 :
if wireType != 0 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Total" , wireType )
}
m . Total = 0
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanonical
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
m . Total |= uint32 ( b & 0x7F ) << shift
if b < 0x80 {
break
}
}
default :
iNdEx = preIndex
skippy , err := skipCanonical ( dAtA [ iNdEx : ] )
@ -936,43 +948,25 @@ func (m *CanonicalProposal) Unmarshal(dAtA []byte) error {
}
}
case 2 :
if wireType != 0 {
if wireType != 1 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Height" , wireType )
}
m . Height = 0
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanonical
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
m . Height |= int64 ( b & 0x7F ) << shift
if b < 0x80 {
break
}
if ( iNdEx + 8 ) > l {
return io . ErrUnexpectedEOF
}
m . Height = int64 ( encoding_binary . LittleEndian . Uint64 ( dAtA [ iNdEx : ] ) )
iNdEx += 8
case 3 :
if wireType != 0 {
if wireType != 1 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Round" , wireType )
}
m . Round = 0
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanonical
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
m . Round |= int64 ( b & 0x7F ) << shift
if b < 0x80 {
break
}
if ( iNdEx + 8 ) > l {
return io . ErrUnexpectedEOF
}
m . Round = int64 ( encoding_binary . LittleEndian . Uint64 ( dAtA [ iNdEx : ] ) )
iNdEx += 8
case 4 :
if wireType != 0 {
return fmt . Errorf ( "proto: wrong wireType = %d for field POLRound" , wireType )
@ -1021,6 +1015,9 @@ func (m *CanonicalProposal) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io . ErrUnexpectedEOF
}
if m . BlockID == nil {
m . BlockID = & CanonicalBlockID { }
}
if err := m . BlockID . Unmarshal ( dAtA [ iNdEx : postIndex ] ) ; err != nil {
return err
}
@ -1163,44 +1160,26 @@ func (m *CanonicalVote) Unmarshal(dAtA []byte) error {
}
}
case 2 :
if wireType != 0 {
if wireType != 1 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Height" , wireType )
}
m . Height = 0
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanonical
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
m . Height |= int64 ( b & 0x7F ) << shift
if b < 0x80 {
break
}
if ( iNdEx + 8 ) > l {
return io . ErrUnexpectedEOF
}
m . Height = int64 ( encoding_binary . LittleEndian . Uint64 ( dAtA [ iNdEx : ] ) )
iNdEx += 8
case 3 :
if wireType != 0 {
if wireType != 1 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Round" , wireType )
}
m . Round = 0
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCanonical
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
m . Round |= int64 ( b & 0x7F ) << shift
if b < 0x80 {
break
}
if ( iNdEx + 8 ) > l {
return io . ErrUnexpectedEOF
}
case 5 :
m . Round = int64 ( encoding_binary . LittleEndian . Uint64 ( dAtA [ iNdEx : ] ) )
iNdEx += 8
case 4 :
if wireType != 2 {
return fmt . Errorf ( "proto: wrong wireType = %d for field BlockID" , wireType )
}
@ -1229,11 +1208,14 @@ func (m *CanonicalVote) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io . ErrUnexpectedEOF
}
if m . BlockID == nil {
m . BlockID = & CanonicalBlockID { }
}
if err := m . BlockID . Unmarshal ( dAtA [ iNdEx : postIndex ] ) ; err != nil {
return err
}
iNdEx = postIndex
case 6 :
case 5 :
if wireType != 2 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Timestamp" , wireType )
}
@ -1266,7 +1248,7 @@ func (m *CanonicalVote) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 7 :
case 6 :
if wireType != 2 {
return fmt . Errorf ( "proto: wrong wireType = %d for field ChainID" , wireType )
}