@ -34,6 +34,7 @@ type ConsensusParams struct {
Evidence * EvidenceParams ` protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty" `
Validator * ValidatorParams ` protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty" `
Version * VersionParams ` protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty" `
Synchrony * SynchronyParams ` protobuf:"bytes,5,opt,name=synchrony,proto3" json:"synchrony,omitempty" `
}
func ( m * ConsensusParams ) Reset ( ) { * m = ConsensusParams { } }
@ -97,6 +98,13 @@ func (m *ConsensusParams) GetVersion() *VersionParams {
return nil
}
func ( m * ConsensusParams ) GetSynchrony ( ) * SynchronyParams {
if m != nil {
return m . Synchrony
}
return nil
}
// BlockParams contains limits on the block size.
type BlockParams struct {
// Max block size, in bytes.
@ -373,6 +381,58 @@ func (m *HashedParams) GetBlockMaxGas() int64 {
return 0
}
type SynchronyParams struct {
MessageDelay time . Duration ` protobuf:"bytes,1,opt,name=message_delay,json=messageDelay,proto3,stdduration" json:"message_delay" `
Precision time . Duration ` protobuf:"bytes,2,opt,name=precision,proto3,stdduration" json:"precision" `
}
func ( m * SynchronyParams ) Reset ( ) { * m = SynchronyParams { } }
func ( m * SynchronyParams ) String ( ) string { return proto . CompactTextString ( m ) }
func ( * SynchronyParams ) ProtoMessage ( ) { }
func ( * SynchronyParams ) Descriptor ( ) ( [ ] byte , [ ] int ) {
return fileDescriptor_e12598271a686f57 , [ ] int { 6 }
}
func ( m * SynchronyParams ) XXX_Unmarshal ( b [ ] byte ) error {
return m . Unmarshal ( b )
}
func ( m * SynchronyParams ) XXX_Marshal ( b [ ] byte , deterministic bool ) ( [ ] byte , error ) {
if deterministic {
return xxx_messageInfo_SynchronyParams . 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 * SynchronyParams ) XXX_Merge ( src proto . Message ) {
xxx_messageInfo_SynchronyParams . Merge ( m , src )
}
func ( m * SynchronyParams ) XXX_Size ( ) int {
return m . Size ( )
}
func ( m * SynchronyParams ) XXX_DiscardUnknown ( ) {
xxx_messageInfo_SynchronyParams . DiscardUnknown ( m )
}
var xxx_messageInfo_SynchronyParams proto . InternalMessageInfo
func ( m * SynchronyParams ) GetMessageDelay ( ) time . Duration {
if m != nil {
return m . MessageDelay
}
return 0
}
func ( m * SynchronyParams ) GetPrecision ( ) time . Duration {
if m != nil {
return m . Precision
}
return 0
}
func init ( ) {
proto . RegisterType ( ( * ConsensusParams ) ( nil ) , "tendermint.types.ConsensusParams" )
proto . RegisterType ( ( * BlockParams ) ( nil ) , "tendermint.types.BlockParams" )
@ -380,44 +440,49 @@ func init() {
proto . RegisterType ( ( * ValidatorParams ) ( nil ) , "tendermint.types.ValidatorParams" )
proto . RegisterType ( ( * VersionParams ) ( nil ) , "tendermint.types.VersionParams" )
proto . RegisterType ( ( * HashedParams ) ( nil ) , "tendermint.types.HashedParams" )
proto . RegisterType ( ( * SynchronyParams ) ( nil ) , "tendermint.types.SynchronyParams" )
}
func init ( ) { proto . RegisterFile ( "tendermint/types/params.proto" , fileDescriptor_e12598271a686f57 ) }
var fileDescriptor_e12598271a686f57 = [ ] byte {
// 498 bytes of a gzipped FileDescriptorProto
0x1f , 0x8b , 0x08 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x02 , 0xff , 0x6c , 0x93 , 0xc1 , 0x6a , 0xd4 , 0x40 ,
0x1c , 0xc6 , 0x77 , 0x9a , 0xda , 0xee , 0xfe , 0xe3 , 0x76 , 0xcb , 0x20 , 0x18 , 0x2b , 0xcd , 0xae , 0x39 ,
0x48 , 0x41 , 0x48 , 0xc4 , 0x22 , 0x22 , 0x08 , 0xe2 , 0x56 , 0xa9 , 0x20 , 0x15 , 0x09 , 0xea , 0xa1 , 0x97 ,
0x30 , 0xd9 , 0x8c , 0x69 , 0xe8 , 0x4e , 0x66 , 0xc8 , 0x24 , 0xcb , 0xee , 0xcd , 0x47 , 0xf0 , 0xe8 , 0x23 ,
0xe8 , 0x9b , 0xf4 , 0xd8 , 0xa3 , 0x27 , 0x95 , 0xdd , 0x17 , 0x91 , 0x4c , 0x32 , 0xa6 , 0x9b , 0xf6 , 0x36 ,
0x33 , 0xdf , 0xef , 0x9b , 0xe1 , 0xfb , 0x86 , 0x3f , 0xec , 0xe7 , 0x34 , 0x8d , 0x68 , 0xc6 , 0x92 , 0x34 ,
0xf7 , 0xf2 , 0x85 , 0xa0 , 0xd2 , 0x13 , 0x24 , 0x23 , 0x4c , 0xba , 0x22 , 0xe3 , 0x39 , 0xc7 , 0xbb , 0x8d ,
0xec , 0x2a , 0x79 , 0xef , 0x4e , 0xcc , 0x63 , 0xae , 0x44 , 0xaf , 0x5c , 0x55 , 0xdc , 0x9e , 0x1d , 0x73 ,
0x1e , 0x4f , 0xa9 , 0xa7 , 0x76 , 0x61 , 0xf1 , 0xc5 , 0x8b , 0x8a , 0x8c , 0xe4 , 0x09 , 0x4f , 0x2b , 0xdd ,
0xf9 , 0xba , 0x01 , 0x83 , 0x23 , 0x9e , 0x4a , 0x9a , 0xca , 0x42 , 0x7e , 0x50 , 0x2f , 0xe0 , 0x43 , 0xb8 ,
0x15 , 0x4e , 0xf9 , 0xe4 , 0xdc , 0x42 , 0x23 , 0x74 , 0x60 , 0x3e , 0xd9 , 0x77 , 0xdb , 0x6f , 0xb9 , 0xe3 ,
0x52 , 0xae , 0x68 , 0xbf , 0x62 , 0xf1 , 0x0b , 0xe8 , 0xd2 , 0x59 , 0x12 , 0xd1 , 0x74 , 0x42 , 0xad , 0x0d ,
0xe5 , 0x1b , 0x5d , 0xf7 , 0xbd , 0xa9 , 0x89 , 0xda , 0xfa , 0xdf , 0x81 , 0x5f , 0x42 , 0x6f , 0x46 , 0xa6 ,
0x49 , 0x44 , 0x72 , 0x9e , 0x59 , 0x86 , 0xb2 , 0x3f , 0xb8 , 0x6e , 0xff , 0xac , 0x91 , 0xda , 0xdf , 0x78 ,
0xf0 , 0x73 , 0xd8 , 0x9e , 0xd1 , 0x4c , 0x26 , 0x3c , 0xb5 , 0x36 , 0x95 , 0x7d , 0x78 , 0x83 , 0xbd , 0x02 ,
0x6a , 0xb3 , 0xe6 , 0x9d , 0x23 , 0x30 , 0xaf , 0xe4 , 0xc1 , 0xf7 , 0xa1 , 0xc7 , 0xc8 , 0x3c , 0x08 , 0x17 ,
0x39 , 0x95 , 0xaa , 0x01 , 0xc3 , 0xef , 0x32 , 0x32 , 0x1f , 0x97 , 0x7b , 0x7c , 0x17 , 0xb6 , 0x4b , 0x31 ,
0x26 , 0x52 , 0x85 , 0x34 , 0xfc , 0x2d , 0x46 , 0xe6 , 0xc7 , 0x44 , 0x3a , 0x3f , 0x11 , 0xec , 0xac , 0xa7 ,
0xc3 , 0x8f , 0x00 , 0x97 , 0x2c , 0x89 , 0x69 , 0x90 , 0x16 , 0x2c , 0x50 , 0x35 , 0xe9 , 0x1b , 0x07 , 0x8c ,
0xcc , 0x5f , 0xc5 , 0xf4 , 0x7d , 0xc1 , 0xd4 , 0xd3 , 0x12 , 0x9f , 0xc0 , 0xae , 0x86 , 0xf5 , 0x0f , 0xd5 ,
0x35 , 0xde , 0x73 , 0xab , 0x2f , 0x74 , 0xf5 , 0x17 , 0xba , 0xaf , 0x6b , 0x60 , 0xdc , 0xbd , 0xf8 , 0x3d ,
0xec , 0x7c , 0xff , 0x33 , 0x44 , 0xfe , 0x4e , 0x75 , 0x9f , 0x56 , 0xd6 , 0x43 , 0x18 , 0xeb , 0x21 , 0x9c ,
0xa7 , 0x30 , 0x68 , 0x35 , 0x89 , 0x1d , 0xe8 , 0x8b , 0x22 , 0x0c , 0xce , 0xe9 , 0x22 , 0x50 , 0x5d , 0x59 ,
0x68 , 0x64 , 0x1c , 0xf4 , 0x7c , 0x53 , 0x14 , 0xe1 , 0x3b , 0xba , 0xf8 , 0x58 , 0x1e , 0x39 , 0x8f , 0xa1 ,
0xbf , 0xd6 , 0x20 , 0x1e , 0x82 , 0x49 , 0x84 , 0x08 , 0x74 , 0xef , 0x65 , 0xb2 , 0x4d , 0x1f , 0x88 , 0x10 ,
0x35 , 0xe6 , 0x9c , 0xc2 , 0xed , 0xb7 , 0x44 , 0x9e , 0xd1 , 0xa8 , 0x36 , 0x3c , 0x84 , 0x81 , 0x6a , 0x21 ,
0x68 , 0x17 , 0xdc , 0x57 , 0xc7 , 0x27 , 0xba , 0x65 , 0x07 , 0xfa , 0x0d , 0xd7 , 0x74 , 0x6d , 0x6a , 0xea ,
0x98 , 0xc8 , 0xf1 , 0xa7 , 0x1f , 0x4b , 0x1b , 0x5d , 0x2c , 0x6d , 0x74 , 0xb9 , 0xb4 , 0xd1 , 0xdf , 0xa5 ,
0x8d , 0xbe , 0xad , 0xec , 0xce , 0xe5 , 0xca , 0xee , 0xfc , 0x5a , 0xd9 , 0x9d , 0xd3 , 0x67 , 0x71 , 0x92 ,
0x9f , 0x15 , 0xa1 , 0x3b , 0xe1 , 0xcc , 0xbb , 0x3a , 0x48 , 0xcd , 0xb2 , 0x9a , 0x94 , 0xf6 , 0x90 , 0x85 ,
0x5b , 0xea , 0xfc , 0xf0 , 0x5f , 0x00 , 0x00 , 0x00 , 0xff , 0xff , 0x18 , 0x54 , 0x4f , 0xe1 , 0x7f , 0x03 ,
0x00 , 0x00 ,
// 561 bytes of a gzipped FileDescriptorProto
0x1f , 0x8b , 0x08 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x02 , 0xff , 0x94 , 0x94 , 0x4d , 0x6b , 0xd4 , 0x40 ,
0x18 , 0xc7 , 0x37 , 0xdd , 0xbe , 0xec , 0x3e , 0xdb , 0xed , 0x96 , 0x41 , 0x30 , 0x56 , 0x9a , 0x5d , 0x73 ,
0x90 , 0x82 , 0x90 , 0x88 , 0x45 , 0x44 , 0x10 , 0xa4 , 0xdb , 0x8a , 0x05 , 0xa9 , 0x48 , 0x7c , 0x39 , 0xf4 ,
0x12 , 0x26 , 0xbb , 0x63 , 0x36 , 0x74 , 0x93 , 0x19 , 0x32 , 0xc9 , 0xb2 , 0xf9 , 0x16 , 0x1e , 0x3d , 0x79 ,
0xd6 , 0x8f , 0xe1 , 0xad , 0xc7 , 0x1e , 0x3d , 0xa9 , 0xec , 0x7e , 0x11 , 0x99 , 0xc9 , 0x4c , 0xd3 , 0xdd ,
0x2a , 0xd8 , 0x5b , 0x32 , 0xcf , 0xef , 0x97 , 0x87 , 0xf9 , 0x3f , 0x93 , 0x81 , 0xdd , 0x8c , 0x24 , 0x43 ,
0x92 , 0xc6 , 0x51 , 0x92 , 0xb9 , 0x59 , 0xc1 , 0x08 , 0x77 , 0x19 , 0x4e , 0x71 , 0xcc , 0x1d , 0x96 , 0xd2 ,
0x8c , 0xa2 , 0xed , 0xaa , 0xec , 0xc8 , 0xf2 , 0xce , 0xad , 0x90 , 0x86 , 0x54 , 0x16 , 0x5d , 0xf1 , 0x54 ,
0x72 , 0x3b , 0x56 , 0x48 , 0x69 , 0x38 , 0x26 , 0xae , 0x7c , 0x0b , 0xf2 , 0x8f , 0xee , 0x30 , 0x4f , 0x71 ,
0x16 , 0xd1 , 0xa4 , 0xac , 0xdb , 0xdf , 0x57 , 0xa0 , 0x73 , 0x48 , 0x13 , 0x4e , 0x12 , 0x9e , 0xf3 , 0x37 ,
0xb2 , 0x03 , 0xda , 0x87 , 0xb5 , 0x60 , 0x4c , 0x07 , 0x67 , 0xa6 , 0xd1 , 0x33 , 0xf6 , 0x5a , 0x8f , 0x76 ,
0x9d , 0xe5 , 0x5e , 0x4e , 0x5f , 0x94 , 0x4b , 0xda , 0x2b , 0x59 , 0xf4 , 0x0c , 0x1a , 0x64 , 0x12 , 0x0d ,
0x49 , 0x32 , 0x20 , 0xe6 , 0x8a , 0xf4 , 0x7a , 0xd7 , 0xbd , 0x17 , 0x8a , 0x50 , 0xea , 0xa5 , 0x81 , 0x9e ,
0x43 , 0x73 , 0x82 , 0xc7 , 0xd1 , 0x10 , 0x67 , 0x34 , 0x35 , 0xeb , 0x52 , 0xbf , 0x77 , 0x5d , 0xff , 0xa0 ,
0x11 , 0xe5 , 0x57 , 0x0e , 0x7a , 0x0a , 0x1b , 0x13 , 0x92 , 0xf2 , 0x88 , 0x26 , 0xe6 , 0xaa , 0xd4 , 0xbb ,
0x7f , 0xd1 , 0x4b , 0x40 , 0xc9 , 0x9a , 0x17 , 0xbd , 0x79 , 0x91 , 0x0c , 0x46 , 0x29 , 0x4d , 0x0a , 0x73 ,
0xed , 0x5f , 0xbd , 0xdf , 0x6a , 0x44 , 0xf7 , 0xbe , 0x74 , 0xec , 0x43 , 0x68 , 0x5d , 0x09 , 0x04 , 0xdd ,
0x85 , 0x66 , 0x8c , 0xa7 , 0x7e , 0x50 , 0x64 , 0x84 , 0xcb , 0x08 , 0xeb , 0x5e , 0x23 , 0xc6 , 0xd3 , 0xbe ,
0x78 , 0x47 , 0xb7 , 0x61 , 0x43 , 0x14 , 0x43 , 0xcc , 0x65 , 0x4a , 0x75 , 0x6f , 0x3d , 0xc6 , 0xd3 , 0x97 ,
0x98 , 0xdb , 0xdf , 0x0c , 0xd8 , 0x5a , 0x8c , 0x07 , 0x3d , 0x00 , 0x24 , 0x58 , 0x1c , 0x12 , 0x3f , 0xc9 ,
0x63 , 0x5f , 0xe6 , 0xac , 0xbf , 0xd8 , 0x89 , 0xf1 , 0xf4 , 0x20 , 0x24 , 0xaf , 0xf3 , 0x58 , 0xb6 , 0xe6 ,
0xe8 , 0x04 , 0xb6 , 0x35 , 0xac , 0x47 , 0xac , 0xe6 , 0x70 , 0xc7 , 0x29 , 0xcf , 0x80 , 0xa3 , 0xcf , 0x80 ,
0x73 , 0xa4 , 0x80 , 0x7e , 0xe3 , 0xfc , 0x67 , 0xb7 , 0xf6 , 0xf9 , 0x57 , 0xd7 , 0xf0 , 0xb6 , 0xca , 0xef ,
0xe9 , 0xca , 0xe2 , 0x26 , 0xea , 0x8b , 0x9b , 0xb0 , 0x1f , 0x43 , 0x67 , 0x69 , 0x14 , 0xc8 , 0x86 , 0x36 ,
0xcb , 0x03 , 0xff , 0x8c , 0x14 , 0xbe , 0xcc , 0xcb , 0x34 , 0x7a , 0xf5 , 0xbd , 0xa6 , 0xd7 , 0x62 , 0x79 ,
0xf0 , 0x8a , 0x14 , 0xef , 0xc4 , 0x92 , 0xfd , 0x10 , 0xda , 0x0b , 0x23 , 0x40 , 0x5d , 0x68 , 0x61 , 0xc6 ,
0x7c , 0x3d , 0x38 , 0xb1 , 0xb3 , 0x55 , 0x0f , 0x30 , 0x63 , 0x0a , 0xb3 , 0x4f , 0x61 , 0xf3 , 0x18 , 0xf3 ,
0x11 , 0x19 , 0x2a , 0xe1 , 0x3e , 0x74 , 0x64 , 0x0a , 0xfe , 0x72 , 0xc0 , 0x6d , 0xb9 , 0x7c , 0xa2 , 0x53 ,
0xb6 , 0xa1 , 0x5d , 0x71 , 0x55 , 0xd6 , 0x2d , 0x4d , 0x89 , 0xc0 , 0xbf , 0x18 , 0xd0 , 0x59 , 0x1a , 0x2a ,
0x3a , 0x86 , 0x76 , 0x4c , 0x38 , 0x97 , 0x21 , 0x92 , 0x31 , 0x2e , 0xd4 , 0x1f , 0xf0 , 0x5f , 0x09 , 0x6e ,
0x2a , 0xf3 , 0x48 , 0x88 , 0xe8 , 0x00 , 0x9a , 0x2c , 0x25 , 0x83 , 0x88 , 0xdf , 0x70 , 0x0e , 0x95 , 0xd5 ,
0x7f , 0xff , 0x75 , 0x66 , 0x19 , 0xe7 , 0x33 , 0xcb , 0xb8 , 0x98 , 0x59 , 0xc6 , 0xef , 0x99 , 0x65 , 0x7c ,
0x9a , 0x5b , 0xb5 , 0x8b , 0xb9 , 0x55 , 0xfb , 0x31 , 0xb7 , 0x6a , 0xa7 , 0x4f , 0xc2 , 0x28 , 0x1b , 0xe5 ,
0x81 , 0x33 , 0xa0 , 0xb1 , 0x7b , 0xf5 , 0xaa , 0xa8 , 0x1e , 0xcb , 0xbb , 0x60 , 0xf9 , 0x1a , 0x09 , 0xd6 ,
0xe5 , 0xfa , 0xfe , 0x9f , 0x00 , 0x00 , 0x00 , 0xff , 0xff , 0xcb , 0x26 , 0x8a , 0x0b , 0x61 , 0x04 , 0x00 ,
0x00 ,
}
func ( this * ConsensusParams ) Equal ( that interface { } ) bool {
@ -451,6 +516,9 @@ func (this *ConsensusParams) Equal(that interface{}) bool {
if ! this . Version . Equal ( that1 . Version ) {
return false
}
if ! this . Synchrony . Equal ( that1 . Synchrony ) {
return false
}
return true
}
func ( this * BlockParams ) Equal ( that interface { } ) bool {
@ -590,6 +658,33 @@ func (this *HashedParams) Equal(that interface{}) bool {
}
return true
}
func ( this * SynchronyParams ) Equal ( that interface { } ) bool {
if that == nil {
return this == nil
}
that1 , ok := that . ( * SynchronyParams )
if ! ok {
that2 , ok := that . ( SynchronyParams )
if ok {
that1 = & that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this . MessageDelay != that1 . MessageDelay {
return false
}
if this . Precision != that1 . Precision {
return false
}
return true
}
func ( m * ConsensusParams ) Marshal ( ) ( dAtA [ ] byte , err error ) {
size := m . Size ( )
dAtA = make ( [ ] byte , size )
@ -610,6 +705,18 @@ func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m . Synchrony != nil {
{
size , err := m . Synchrony . MarshalToSizedBuffer ( dAtA [ : i ] )
if err != nil {
return 0 , err
}
i -= size
i = encodeVarintParams ( dAtA , i , uint64 ( size ) )
}
i --
dAtA [ i ] = 0x2a
}
if m . Version != nil {
{
size , err := m . Version . MarshalToSizedBuffer ( dAtA [ : i ] )
@ -719,12 +826,12 @@ func (m *EvidenceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i --
dAtA [ i ] = 0x18
}
n5 , err5 := github_com_gogo_protobuf_types . StdDurationMarshalTo ( m . MaxAgeDuration , dAtA [ i - github_com_gogo_protobuf_types . SizeOfStdDuration ( m . MaxAgeDuration ) : ] )
if err5 != nil {
return 0 , err5
n6 , err6 := github_com_gogo_protobuf_types . StdDurationMarshalTo ( m . MaxAgeDuration , dAtA [ i - github_com_gogo_protobuf_types . SizeOfStdDuration ( m . MaxAgeDuration ) : ] )
if err6 != nil {
return 0 , err6
}
i -= n5
i = encodeVarintParams ( dAtA , i , uint64 ( n5 ) )
i -= n6
i = encodeVarintParams ( dAtA , i , uint64 ( n6 ) )
i --
dAtA [ i ] = 0x12
if m . MaxAgeNumBlocks != 0 {
@ -828,6 +935,45 @@ func (m *HashedParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len ( dAtA ) - i , nil
}
func ( m * SynchronyParams ) 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 * SynchronyParams ) MarshalTo ( dAtA [ ] byte ) ( int , error ) {
size := m . Size ( )
return m . MarshalToSizedBuffer ( dAtA [ : size ] )
}
func ( m * SynchronyParams ) MarshalToSizedBuffer ( dAtA [ ] byte ) ( int , error ) {
i := len ( dAtA )
_ = i
var l int
_ = l
n7 , err7 := github_com_gogo_protobuf_types . StdDurationMarshalTo ( m . Precision , dAtA [ i - github_com_gogo_protobuf_types . SizeOfStdDuration ( m . Precision ) : ] )
if err7 != nil {
return 0 , err7
}
i -= n7
i = encodeVarintParams ( dAtA , i , uint64 ( n7 ) )
i --
dAtA [ i ] = 0x12
n8 , err8 := github_com_gogo_protobuf_types . StdDurationMarshalTo ( m . MessageDelay , dAtA [ i - github_com_gogo_protobuf_types . SizeOfStdDuration ( m . MessageDelay ) : ] )
if err8 != nil {
return 0 , err8
}
i -= n8
i = encodeVarintParams ( dAtA , i , uint64 ( n8 ) )
i --
dAtA [ i ] = 0xa
return len ( dAtA ) - i , nil
}
func encodeVarintParams ( dAtA [ ] byte , offset int , v uint64 ) int {
offset -= sovParams ( v )
base := offset
@ -861,6 +1007,10 @@ func (m *ConsensusParams) Size() (n int) {
l = m . Version . Size ( )
n += 1 + l + sovParams ( uint64 ( l ) )
}
if m . Synchrony != nil {
l = m . Synchrony . Size ( )
n += 1 + l + sovParams ( uint64 ( l ) )
}
return n
}
@ -938,6 +1088,19 @@ func (m *HashedParams) Size() (n int) {
return n
}
func ( m * SynchronyParams ) Size ( ) ( n int ) {
if m == nil {
return 0
}
var l int
_ = l
l = github_com_gogo_protobuf_types . SizeOfStdDuration ( m . MessageDelay )
n += 1 + l + sovParams ( uint64 ( l ) )
l = github_com_gogo_protobuf_types . SizeOfStdDuration ( m . Precision )
n += 1 + l + sovParams ( uint64 ( l ) )
return n
}
func sovParams ( x uint64 ) ( n int ) {
return ( math_bits . Len64 ( x | 1 ) + 6 ) / 7
}
@ -1117,6 +1280,42 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 5 :
if wireType != 2 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Synchrony" , wireType )
}
var msglen int
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
msglen |= int ( b & 0x7F ) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthParams
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io . ErrUnexpectedEOF
}
if m . Synchrony == nil {
m . Synchrony = & SynchronyParams { }
}
if err := m . Synchrony . Unmarshal ( dAtA [ iNdEx : postIndex ] ) ; err != nil {
return err
}
iNdEx = postIndex
default :
iNdEx = preIndex
skippy , err := skipParams ( dAtA [ iNdEx : ] )
@ -1586,6 +1785,122 @@ func (m *HashedParams) Unmarshal(dAtA []byte) error {
}
return nil
}
func ( m * SynchronyParams ) 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 ErrIntOverflowParams
}
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: SynchronyParams: wiretype end group for non-group" )
}
if fieldNum <= 0 {
return fmt . Errorf ( "proto: SynchronyParams: illegal tag %d (wire type %d)" , fieldNum , wire )
}
switch fieldNum {
case 1 :
if wireType != 2 {
return fmt . Errorf ( "proto: wrong wireType = %d for field MessageDelay" , wireType )
}
var msglen int
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
msglen |= int ( b & 0x7F ) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthParams
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io . ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types . StdDurationUnmarshal ( & m . MessageDelay , dAtA [ iNdEx : postIndex ] ) ; err != nil {
return err
}
iNdEx = postIndex
case 2 :
if wireType != 2 {
return fmt . Errorf ( "proto: wrong wireType = %d for field Precision" , wireType )
}
var msglen int
for shift := uint ( 0 ) ; ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
msglen |= int ( b & 0x7F ) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthParams
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io . ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types . StdDurationUnmarshal ( & m . Precision , dAtA [ iNdEx : postIndex ] ) ; err != nil {
return err
}
iNdEx = postIndex
default :
iNdEx = preIndex
skippy , err := skipParams ( dAtA [ iNdEx : ] )
if err != nil {
return err
}
if ( skippy < 0 ) || ( iNdEx + skippy ) < 0 {
return ErrInvalidLengthParams
}
if ( iNdEx + skippy ) > l {
return io . ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io . ErrUnexpectedEOF
}
return nil
}
func skipParams ( dAtA [ ] byte ) ( n int , err error ) {
l := len ( dAtA )
iNdEx := 0