// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: tendermint/types/params.proto
|
|
|
|
package types
|
|
|
|
import (
|
|
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/golang/protobuf/ptypes/duration"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
time "time"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
var _ = time.Kitchen
|
|
|
|
// 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
|
|
|
|
// ConsensusParams contains consensus critical parameters that determine the
|
|
// validity of blocks.
|
|
type ConsensusParams struct {
|
|
Block *BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
|
|
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"`
|
|
Timeout *TimeoutParams `protobuf:"bytes,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
|
|
}
|
|
|
|
func (m *ConsensusParams) Reset() { *m = ConsensusParams{} }
|
|
func (m *ConsensusParams) String() string { return proto.CompactTextString(m) }
|
|
func (*ConsensusParams) ProtoMessage() {}
|
|
func (*ConsensusParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e12598271a686f57, []int{0}
|
|
}
|
|
func (m *ConsensusParams) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ConsensusParams.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 *ConsensusParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ConsensusParams.Merge(m, src)
|
|
}
|
|
func (m *ConsensusParams) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ConsensusParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ConsensusParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo
|
|
|
|
func (m *ConsensusParams) GetBlock() *BlockParams {
|
|
if m != nil {
|
|
return m.Block
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ConsensusParams) GetEvidence() *EvidenceParams {
|
|
if m != nil {
|
|
return m.Evidence
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ConsensusParams) GetValidator() *ValidatorParams {
|
|
if m != nil {
|
|
return m.Validator
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ConsensusParams) GetVersion() *VersionParams {
|
|
if m != nil {
|
|
return m.Version
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ConsensusParams) GetSynchrony() *SynchronyParams {
|
|
if m != nil {
|
|
return m.Synchrony
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ConsensusParams) GetTimeout() *TimeoutParams {
|
|
if m != nil {
|
|
return m.Timeout
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// BlockParams contains limits on the block size.
|
|
type BlockParams struct {
|
|
// Max block size, in bytes.
|
|
// Note: must be greater than 0
|
|
MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
|
|
// Max gas per block.
|
|
// Note: must be greater or equal to -1
|
|
MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"`
|
|
}
|
|
|
|
func (m *BlockParams) Reset() { *m = BlockParams{} }
|
|
func (m *BlockParams) String() string { return proto.CompactTextString(m) }
|
|
func (*BlockParams) ProtoMessage() {}
|
|
func (*BlockParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e12598271a686f57, []int{1}
|
|
}
|
|
func (m *BlockParams) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_BlockParams.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 *BlockParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_BlockParams.Merge(m, src)
|
|
}
|
|
func (m *BlockParams) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *BlockParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_BlockParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_BlockParams proto.InternalMessageInfo
|
|
|
|
func (m *BlockParams) GetMaxBytes() int64 {
|
|
if m != nil {
|
|
return m.MaxBytes
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *BlockParams) GetMaxGas() int64 {
|
|
if m != nil {
|
|
return m.MaxGas
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// EvidenceParams determine how we handle evidence of malfeasance.
|
|
type EvidenceParams struct {
|
|
// Max age of evidence, in blocks.
|
|
//
|
|
// The basic formula for calculating this is: MaxAgeDuration / {average block
|
|
// time}.
|
|
MaxAgeNumBlocks int64 `protobuf:"varint,1,opt,name=max_age_num_blocks,json=maxAgeNumBlocks,proto3" json:"max_age_num_blocks,omitempty"`
|
|
// Max age of evidence, in time.
|
|
//
|
|
// It should correspond with an app's "unbonding period" or other similar
|
|
// mechanism for handling [Nothing-At-Stake
|
|
// attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
|
|
MaxAgeDuration time.Duration `protobuf:"bytes,2,opt,name=max_age_duration,json=maxAgeDuration,proto3,stdduration" json:"max_age_duration"`
|
|
// This sets the maximum size of total evidence in bytes that can be committed
|
|
// in a single block. and should fall comfortably under the max block bytes.
|
|
// Default is 1048576 or 1MB
|
|
MaxBytes int64 `protobuf:"varint,3,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
|
|
}
|
|
|
|
func (m *EvidenceParams) Reset() { *m = EvidenceParams{} }
|
|
func (m *EvidenceParams) String() string { return proto.CompactTextString(m) }
|
|
func (*EvidenceParams) ProtoMessage() {}
|
|
func (*EvidenceParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e12598271a686f57, []int{2}
|
|
}
|
|
func (m *EvidenceParams) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *EvidenceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_EvidenceParams.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 *EvidenceParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_EvidenceParams.Merge(m, src)
|
|
}
|
|
func (m *EvidenceParams) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *EvidenceParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_EvidenceParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_EvidenceParams proto.InternalMessageInfo
|
|
|
|
func (m *EvidenceParams) GetMaxAgeNumBlocks() int64 {
|
|
if m != nil {
|
|
return m.MaxAgeNumBlocks
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *EvidenceParams) GetMaxAgeDuration() time.Duration {
|
|
if m != nil {
|
|
return m.MaxAgeDuration
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *EvidenceParams) GetMaxBytes() int64 {
|
|
if m != nil {
|
|
return m.MaxBytes
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ValidatorParams restrict the public key types validators can use.
|
|
// NOTE: uses ABCI pubkey naming, not Amino names.
|
|
type ValidatorParams struct {
|
|
PubKeyTypes []string `protobuf:"bytes,1,rep,name=pub_key_types,json=pubKeyTypes,proto3" json:"pub_key_types,omitempty"`
|
|
}
|
|
|
|
func (m *ValidatorParams) Reset() { *m = ValidatorParams{} }
|
|
func (m *ValidatorParams) String() string { return proto.CompactTextString(m) }
|
|
func (*ValidatorParams) ProtoMessage() {}
|
|
func (*ValidatorParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e12598271a686f57, []int{3}
|
|
}
|
|
func (m *ValidatorParams) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ValidatorParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ValidatorParams.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 *ValidatorParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ValidatorParams.Merge(m, src)
|
|
}
|
|
func (m *ValidatorParams) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ValidatorParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ValidatorParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ValidatorParams proto.InternalMessageInfo
|
|
|
|
func (m *ValidatorParams) GetPubKeyTypes() []string {
|
|
if m != nil {
|
|
return m.PubKeyTypes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// VersionParams contains the ABCI application version.
|
|
type VersionParams struct {
|
|
AppVersion uint64 `protobuf:"varint,1,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
|
|
}
|
|
|
|
func (m *VersionParams) Reset() { *m = VersionParams{} }
|
|
func (m *VersionParams) String() string { return proto.CompactTextString(m) }
|
|
func (*VersionParams) ProtoMessage() {}
|
|
func (*VersionParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e12598271a686f57, []int{4}
|
|
}
|
|
func (m *VersionParams) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *VersionParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_VersionParams.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 *VersionParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_VersionParams.Merge(m, src)
|
|
}
|
|
func (m *VersionParams) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *VersionParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_VersionParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_VersionParams proto.InternalMessageInfo
|
|
|
|
func (m *VersionParams) GetAppVersion() uint64 {
|
|
if m != nil {
|
|
return m.AppVersion
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// HashedParams is a subset of ConsensusParams.
|
|
//
|
|
// It is hashed into the Header.ConsensusHash.
|
|
type HashedParams struct {
|
|
BlockMaxBytes int64 `protobuf:"varint,1,opt,name=block_max_bytes,json=blockMaxBytes,proto3" json:"block_max_bytes,omitempty"`
|
|
BlockMaxGas int64 `protobuf:"varint,2,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"`
|
|
}
|
|
|
|
func (m *HashedParams) Reset() { *m = HashedParams{} }
|
|
func (m *HashedParams) String() string { return proto.CompactTextString(m) }
|
|
func (*HashedParams) ProtoMessage() {}
|
|
func (*HashedParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e12598271a686f57, []int{5}
|
|
}
|
|
func (m *HashedParams) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *HashedParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_HashedParams.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 *HashedParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_HashedParams.Merge(m, src)
|
|
}
|
|
func (m *HashedParams) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *HashedParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_HashedParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_HashedParams proto.InternalMessageInfo
|
|
|
|
func (m *HashedParams) GetBlockMaxBytes() int64 {
|
|
if m != nil {
|
|
return m.BlockMaxBytes
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *HashedParams) GetBlockMaxGas() int64 {
|
|
if m != nil {
|
|
return m.BlockMaxGas
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// SynchronyParams configure the bounds under which a proposed block's timestamp is considered valid.
|
|
// These parameters are part of the proposer-based timestamps algorithm. For more information,
|
|
// see the specification of proposer-based timestamps:
|
|
// https://github.com/tendermint/tendermint/tree/master/spec/consensus/proposer-based-timestamp
|
|
type SynchronyParams struct {
|
|
// message_delay bounds how long a proposal message may take to reach all validators on a newtork
|
|
// and still be considered valid.
|
|
MessageDelay *time.Duration `protobuf:"bytes,1,opt,name=message_delay,json=messageDelay,proto3,stdduration" json:"message_delay,omitempty"`
|
|
// precision bounds how skewed a proposer's clock may be from any validator
|
|
// on the network while still producing valid proposals.
|
|
Precision *time.Duration `protobuf:"bytes,2,opt,name=precision,proto3,stdduration" json:"precision,omitempty"`
|
|
}
|
|
|
|
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 nil
|
|
}
|
|
|
|
func (m *SynchronyParams) GetPrecision() *time.Duration {
|
|
if m != nil {
|
|
return m.Precision
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// TimeoutParams configure the timeouts for the steps of the Tendermint consensus algorithm.
|
|
type TimeoutParams struct {
|
|
// These fields configure the timeouts for the propose step of the Tendermint
|
|
// consensus algorithm: propose is the initial timeout and propose_delta
|
|
// determines how much the timeout grows in subsequent rounds.
|
|
// For the first round, this propose timeout is used and for every subsequent
|
|
// round, the timeout grows by propose_delta.
|
|
//
|
|
// For example:
|
|
// With propose = 10ms, propose_delta = 5ms, the first round's propose phase
|
|
// timeout would be 10ms, the second round's would be 15ms, the third 20ms and so on.
|
|
//
|
|
// If a node waiting for a proposal message does not receive one matching its
|
|
// current height and round before this timeout, the node will issue a
|
|
// nil prevote for the round and advance to the next step.
|
|
Propose *time.Duration `protobuf:"bytes,1,opt,name=propose,proto3,stdduration" json:"propose,omitempty"`
|
|
ProposeDelta *time.Duration `protobuf:"bytes,2,opt,name=propose_delta,json=proposeDelta,proto3,stdduration" json:"propose_delta,omitempty"`
|
|
// vote along with vote_delta configure the timeout for both of the prevote and
|
|
// precommit steps of the Tendermint consensus algorithm.
|
|
//
|
|
// These parameters influence the vote step timeouts in the the same way that
|
|
// the propose and propose_delta parameters do to the proposal step.
|
|
//
|
|
// The vote timeout does not begin until a quorum of votes has been received. Once
|
|
// a quorum of votes has been seen and this timeout elapses, Tendermint will
|
|
// procced to the next step of the consensus algorithm. If Tendermint receives
|
|
// all of the remaining votes before the end of the timeout, it will proceed
|
|
// to the next step immediately.
|
|
Vote *time.Duration `protobuf:"bytes,3,opt,name=vote,proto3,stdduration" json:"vote,omitempty"`
|
|
VoteDelta *time.Duration `protobuf:"bytes,4,opt,name=vote_delta,json=voteDelta,proto3,stdduration" json:"vote_delta,omitempty"`
|
|
// commit configures how long Tendermint will wait after receiving a quorum of
|
|
// precommits before beginning consensus for the next height. This can be
|
|
// used to allow slow precommits to arrive for inclusion in the next height before progressing.
|
|
Commit *time.Duration `protobuf:"bytes,5,opt,name=commit,proto3,stdduration" json:"commit,omitempty"`
|
|
// bypass_commit_timeout configures the node to proceed immediately to
|
|
// the next height once the node has received all precommits for a block, forgoing
|
|
// the remaining commit timeout.
|
|
// Setting bypass_commit_timeout false (the default) causes Tendermint to wait
|
|
// for the full commit timeout.
|
|
BypassCommitTimeout bool `protobuf:"varint,6,opt,name=bypass_commit_timeout,json=bypassCommitTimeout,proto3" json:"bypass_commit_timeout,omitempty"`
|
|
}
|
|
|
|
func (m *TimeoutParams) Reset() { *m = TimeoutParams{} }
|
|
func (m *TimeoutParams) String() string { return proto.CompactTextString(m) }
|
|
func (*TimeoutParams) ProtoMessage() {}
|
|
func (*TimeoutParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_e12598271a686f57, []int{7}
|
|
}
|
|
func (m *TimeoutParams) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TimeoutParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TimeoutParams.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 *TimeoutParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TimeoutParams.Merge(m, src)
|
|
}
|
|
func (m *TimeoutParams) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TimeoutParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TimeoutParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TimeoutParams proto.InternalMessageInfo
|
|
|
|
func (m *TimeoutParams) GetPropose() *time.Duration {
|
|
if m != nil {
|
|
return m.Propose
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TimeoutParams) GetProposeDelta() *time.Duration {
|
|
if m != nil {
|
|
return m.ProposeDelta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TimeoutParams) GetVote() *time.Duration {
|
|
if m != nil {
|
|
return m.Vote
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TimeoutParams) GetVoteDelta() *time.Duration {
|
|
if m != nil {
|
|
return m.VoteDelta
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TimeoutParams) GetCommit() *time.Duration {
|
|
if m != nil {
|
|
return m.Commit
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TimeoutParams) GetBypassCommitTimeout() bool {
|
|
if m != nil {
|
|
return m.BypassCommitTimeout
|
|
}
|
|
return false
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*ConsensusParams)(nil), "tendermint.types.ConsensusParams")
|
|
proto.RegisterType((*BlockParams)(nil), "tendermint.types.BlockParams")
|
|
proto.RegisterType((*EvidenceParams)(nil), "tendermint.types.EvidenceParams")
|
|
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")
|
|
proto.RegisterType((*TimeoutParams)(nil), "tendermint.types.TimeoutParams")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("tendermint/types/params.proto", fileDescriptor_e12598271a686f57) }
|
|
|
|
var fileDescriptor_e12598271a686f57 = []byte{
|
|
// 680 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x6e, 0xd3, 0x4a,
|
|
0x14, 0xc6, 0xe3, 0x26, 0x4d, 0x93, 0x93, 0xa6, 0xa9, 0xe6, 0xde, 0xab, 0xeb, 0xdb, 0xab, 0x3a,
|
|
0xc5, 0x0b, 0x54, 0x09, 0xc9, 0x41, 0xad, 0x50, 0x85, 0xc4, 0x1f, 0x91, 0x06, 0x81, 0x84, 0x8a,
|
|
0x90, 0x29, 0x2c, 0xba, 0xb1, 0xc6, 0xc9, 0xe0, 0x5a, 0x8d, 0x3d, 0x96, 0xc7, 0x8e, 0xe2, 0xb7,
|
|
0x60, 0x85, 0x78, 0x04, 0x78, 0x93, 0x2e, 0xbb, 0x64, 0x05, 0x28, 0x7d, 0x03, 0xd6, 0x2c, 0xd0,
|
|
0xfc, 0x6b, 0x9a, 0x94, 0xd2, 0xac, 0xe2, 0xcc, 0xf9, 0x7e, 0xfe, 0x3c, 0xdf, 0x39, 0x33, 0xb0,
|
|
0x99, 0x91, 0x78, 0x40, 0xd2, 0x28, 0x8c, 0xb3, 0x4e, 0x56, 0x24, 0x84, 0x75, 0x12, 0x9c, 0xe2,
|
|
0x88, 0x39, 0x49, 0x4a, 0x33, 0x8a, 0xd6, 0xa7, 0x65, 0x47, 0x94, 0x37, 0xfe, 0x0e, 0x68, 0x40,
|
|
0x45, 0xb1, 0xc3, 0x9f, 0xa4, 0x6e, 0xc3, 0x0a, 0x28, 0x0d, 0x86, 0xa4, 0x23, 0xfe, 0xf9, 0xf9,
|
|
0xbb, 0xce, 0x20, 0x4f, 0x71, 0x16, 0xd2, 0x58, 0xd6, 0xed, 0x9f, 0x4b, 0xd0, 0xda, 0xa7, 0x31,
|
|
0x23, 0x31, 0xcb, 0xd9, 0x2b, 0xe1, 0x80, 0x76, 0x61, 0xd9, 0x1f, 0xd2, 0xfe, 0x89, 0x69, 0x6c,
|
|
0x19, 0xdb, 0x8d, 0x9d, 0x4d, 0x67, 0xde, 0xcb, 0xe9, 0xf2, 0xb2, 0x54, 0xbb, 0x52, 0x8b, 0x1e,
|
|
0x40, 0x8d, 0x8c, 0xc2, 0x01, 0x89, 0xfb, 0xc4, 0x5c, 0x12, 0xdc, 0xd6, 0x55, 0xee, 0xa9, 0x52,
|
|
0x28, 0xf4, 0x82, 0x40, 0x8f, 0xa1, 0x3e, 0xc2, 0xc3, 0x70, 0x80, 0x33, 0x9a, 0x9a, 0x65, 0x81,
|
|
0xdf, 0xba, 0x8a, 0xbf, 0xd5, 0x12, 0xc5, 0x4f, 0x19, 0x74, 0x1f, 0x56, 0x46, 0x24, 0x65, 0x21,
|
|
0x8d, 0xcd, 0x8a, 0xc0, 0xdb, 0xbf, 0xc1, 0xa5, 0x40, 0xc1, 0x5a, 0xcf, 0xbd, 0x59, 0x11, 0xf7,
|
|
0x8f, 0x53, 0x1a, 0x17, 0xe6, 0xf2, 0x75, 0xde, 0xaf, 0xb5, 0x44, 0x7b, 0x5f, 0x30, 0xdc, 0x3b,
|
|
0x0b, 0x23, 0x42, 0xf3, 0xcc, 0xac, 0x5e, 0xe7, 0x7d, 0x28, 0x05, 0xda, 0x5b, 0xe9, 0xed, 0x7d,
|
|
0x68, 0x5c, 0xca, 0x12, 0xfd, 0x0f, 0xf5, 0x08, 0x8f, 0x3d, 0xbf, 0xc8, 0x08, 0x13, 0xe9, 0x97,
|
|
0xdd, 0x5a, 0x84, 0xc7, 0x5d, 0xfe, 0x1f, 0xfd, 0x0b, 0x2b, 0xbc, 0x18, 0x60, 0x26, 0x02, 0x2e,
|
|
0xbb, 0xd5, 0x08, 0x8f, 0x9f, 0x61, 0x66, 0x7f, 0x36, 0x60, 0x6d, 0x36, 0x59, 0x74, 0x07, 0x10,
|
|
0xd7, 0xe2, 0x80, 0x78, 0x71, 0x1e, 0x79, 0xa2, 0x45, 0xfa, 0x8d, 0xad, 0x08, 0x8f, 0x9f, 0x04,
|
|
0xe4, 0x65, 0x1e, 0x09, 0x6b, 0x86, 0x0e, 0x60, 0x5d, 0x8b, 0xf5, 0x74, 0xa8, 0x16, 0xfe, 0xe7,
|
|
0xc8, 0xf1, 0x71, 0xf4, 0xf8, 0x38, 0x3d, 0x25, 0xe8, 0xd6, 0x4e, 0xbf, 0xb6, 0x4b, 0x1f, 0xbf,
|
|
0xb5, 0x0d, 0x77, 0x4d, 0xbe, 0x4f, 0x57, 0x66, 0x37, 0x51, 0x9e, 0xdd, 0x84, 0x7d, 0x0f, 0x5a,
|
|
0x73, 0x5d, 0x44, 0x36, 0x34, 0x93, 0xdc, 0xf7, 0x4e, 0x48, 0xe1, 0x89, 0xac, 0x4c, 0x63, 0xab,
|
|
0xbc, 0x5d, 0x77, 0x1b, 0x49, 0xee, 0xbf, 0x20, 0xc5, 0x21, 0x5f, 0xb2, 0xef, 0x42, 0x73, 0xa6,
|
|
0x7b, 0xa8, 0x0d, 0x0d, 0x9c, 0x24, 0x9e, 0xee, 0x39, 0xdf, 0x59, 0xc5, 0x05, 0x9c, 0x24, 0x4a,
|
|
0x66, 0x1f, 0xc1, 0xea, 0x73, 0xcc, 0x8e, 0xc9, 0x40, 0x01, 0xb7, 0xa1, 0x25, 0x52, 0xf0, 0xe6,
|
|
0x03, 0x6e, 0x8a, 0xe5, 0x03, 0x9d, 0xb2, 0x0d, 0xcd, 0xa9, 0x6e, 0x9a, 0x75, 0x43, 0xab, 0x78,
|
|
0xe0, 0x1f, 0x0c, 0x68, 0xcd, 0xcd, 0x03, 0xea, 0x41, 0x33, 0x22, 0x8c, 0x89, 0x10, 0xc9, 0x10,
|
|
0x17, 0xea, 0xf0, 0xfc, 0x21, 0xc1, 0x8a, 0x48, 0x6f, 0x55, 0x51, 0x3d, 0x0e, 0xa1, 0x87, 0x50,
|
|
0x4f, 0x52, 0xd2, 0x0f, 0xd9, 0x42, 0x3d, 0x90, 0x6f, 0x98, 0x12, 0xf6, 0x8f, 0x25, 0x68, 0xce,
|
|
0x4c, 0x1a, 0x9f, 0xcd, 0x24, 0xa5, 0x09, 0x65, 0x64, 0xd1, 0x0f, 0xd2, 0x7a, 0xbe, 0x23, 0xf5,
|
|
0xc8, 0x77, 0x94, 0xe1, 0x45, 0xbf, 0x67, 0x55, 0x51, 0x3d, 0x0e, 0xa1, 0x5d, 0xa8, 0x8c, 0x68,
|
|
0x46, 0xd4, 0xa1, 0xbe, 0x11, 0x16, 0x62, 0xf4, 0x08, 0x80, 0xff, 0x2a, 0xdf, 0xca, 0x82, 0x39,
|
|
0x70, 0x44, 0x9a, 0xee, 0x41, 0xb5, 0x4f, 0xa3, 0x28, 0xcc, 0xd4, 0x79, 0xbe, 0x91, 0x55, 0x72,
|
|
0xb4, 0x03, 0xff, 0xf8, 0x45, 0x82, 0x19, 0xf3, 0xe4, 0x82, 0x77, 0xf9, 0x60, 0xd7, 0xdc, 0xbf,
|
|
0x64, 0x71, 0x5f, 0xd4, 0x54, 0xd0, 0xdd, 0x37, 0x9f, 0x26, 0x96, 0x71, 0x3a, 0xb1, 0x8c, 0xb3,
|
|
0x89, 0x65, 0x7c, 0x9f, 0x58, 0xc6, 0xfb, 0x73, 0xab, 0x74, 0x76, 0x6e, 0x95, 0xbe, 0x9c, 0x5b,
|
|
0xa5, 0xa3, 0xbd, 0x20, 0xcc, 0x8e, 0x73, 0xdf, 0xe9, 0xd3, 0xa8, 0x73, 0xf9, 0x4a, 0x9f, 0x3e,
|
|
0xca, 0x3b, 0x7b, 0xfe, 0xba, 0xf7, 0xab, 0x62, 0x7d, 0xf7, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff,
|
|
0xfc, 0x06, 0xae, 0x9f, 0x09, 0x06, 0x00, 0x00,
|
|
}
|
|
|
|
func (this *ConsensusParams) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*ConsensusParams)
|
|
if !ok {
|
|
that2, ok := that.(ConsensusParams)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !this.Block.Equal(that1.Block) {
|
|
return false
|
|
}
|
|
if !this.Evidence.Equal(that1.Evidence) {
|
|
return false
|
|
}
|
|
if !this.Validator.Equal(that1.Validator) {
|
|
return false
|
|
}
|
|
if !this.Version.Equal(that1.Version) {
|
|
return false
|
|
}
|
|
if !this.Synchrony.Equal(that1.Synchrony) {
|
|
return false
|
|
}
|
|
if !this.Timeout.Equal(that1.Timeout) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *BlockParams) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*BlockParams)
|
|
if !ok {
|
|
that2, ok := that.(BlockParams)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.MaxBytes != that1.MaxBytes {
|
|
return false
|
|
}
|
|
if this.MaxGas != that1.MaxGas {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *EvidenceParams) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*EvidenceParams)
|
|
if !ok {
|
|
that2, ok := that.(EvidenceParams)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.MaxAgeNumBlocks != that1.MaxAgeNumBlocks {
|
|
return false
|
|
}
|
|
if this.MaxAgeDuration != that1.MaxAgeDuration {
|
|
return false
|
|
}
|
|
if this.MaxBytes != that1.MaxBytes {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *ValidatorParams) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*ValidatorParams)
|
|
if !ok {
|
|
that2, ok := that.(ValidatorParams)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if len(this.PubKeyTypes) != len(that1.PubKeyTypes) {
|
|
return false
|
|
}
|
|
for i := range this.PubKeyTypes {
|
|
if this.PubKeyTypes[i] != that1.PubKeyTypes[i] {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *VersionParams) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*VersionParams)
|
|
if !ok {
|
|
that2, ok := that.(VersionParams)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.AppVersion != that1.AppVersion {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *HashedParams) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*HashedParams)
|
|
if !ok {
|
|
that2, ok := that.(HashedParams)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.BlockMaxBytes != that1.BlockMaxBytes {
|
|
return false
|
|
}
|
|
if this.BlockMaxGas != that1.BlockMaxGas {
|
|
return false
|
|
}
|
|
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 != nil && that1.MessageDelay != nil {
|
|
if *this.MessageDelay != *that1.MessageDelay {
|
|
return false
|
|
}
|
|
} else if this.MessageDelay != nil {
|
|
return false
|
|
} else if that1.MessageDelay != nil {
|
|
return false
|
|
}
|
|
if this.Precision != nil && that1.Precision != nil {
|
|
if *this.Precision != *that1.Precision {
|
|
return false
|
|
}
|
|
} else if this.Precision != nil {
|
|
return false
|
|
} else if that1.Precision != nil {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *TimeoutParams) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TimeoutParams)
|
|
if !ok {
|
|
that2, ok := that.(TimeoutParams)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Propose != nil && that1.Propose != nil {
|
|
if *this.Propose != *that1.Propose {
|
|
return false
|
|
}
|
|
} else if this.Propose != nil {
|
|
return false
|
|
} else if that1.Propose != nil {
|
|
return false
|
|
}
|
|
if this.ProposeDelta != nil && that1.ProposeDelta != nil {
|
|
if *this.ProposeDelta != *that1.ProposeDelta {
|
|
return false
|
|
}
|
|
} else if this.ProposeDelta != nil {
|
|
return false
|
|
} else if that1.ProposeDelta != nil {
|
|
return false
|
|
}
|
|
if this.Vote != nil && that1.Vote != nil {
|
|
if *this.Vote != *that1.Vote {
|
|
return false
|
|
}
|
|
} else if this.Vote != nil {
|
|
return false
|
|
} else if that1.Vote != nil {
|
|
return false
|
|
}
|
|
if this.VoteDelta != nil && that1.VoteDelta != nil {
|
|
if *this.VoteDelta != *that1.VoteDelta {
|
|
return false
|
|
}
|
|
} else if this.VoteDelta != nil {
|
|
return false
|
|
} else if that1.VoteDelta != nil {
|
|
return false
|
|
}
|
|
if this.Commit != nil && that1.Commit != nil {
|
|
if *this.Commit != *that1.Commit {
|
|
return false
|
|
}
|
|
} else if this.Commit != nil {
|
|
return false
|
|
} else if that1.Commit != nil {
|
|
return false
|
|
}
|
|
if this.BypassCommitTimeout != that1.BypassCommitTimeout {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (m *ConsensusParams) 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 *ConsensusParams) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Timeout != nil {
|
|
{
|
|
size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintParams(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x32
|
|
}
|
|
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])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintParams(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.Validator != nil {
|
|
{
|
|
size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintParams(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.Evidence != nil {
|
|
{
|
|
size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintParams(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Block != nil {
|
|
{
|
|
size, err := m.Block.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintParams(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *BlockParams) 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 *BlockParams) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.MaxGas != 0 {
|
|
i = encodeVarintParams(dAtA, i, uint64(m.MaxGas))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.MaxBytes != 0 {
|
|
i = encodeVarintParams(dAtA, i, uint64(m.MaxBytes))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *EvidenceParams) 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 *EvidenceParams) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *EvidenceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.MaxBytes != 0 {
|
|
i = encodeVarintParams(dAtA, i, uint64(m.MaxBytes))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
n7, err7 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):])
|
|
if err7 != nil {
|
|
return 0, err7
|
|
}
|
|
i -= n7
|
|
i = encodeVarintParams(dAtA, i, uint64(n7))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
if m.MaxAgeNumBlocks != 0 {
|
|
i = encodeVarintParams(dAtA, i, uint64(m.MaxAgeNumBlocks))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ValidatorParams) 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 *ValidatorParams) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ValidatorParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.PubKeyTypes) > 0 {
|
|
for iNdEx := len(m.PubKeyTypes) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.PubKeyTypes[iNdEx])
|
|
copy(dAtA[i:], m.PubKeyTypes[iNdEx])
|
|
i = encodeVarintParams(dAtA, i, uint64(len(m.PubKeyTypes[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *VersionParams) 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 *VersionParams) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *VersionParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.AppVersion != 0 {
|
|
i = encodeVarintParams(dAtA, i, uint64(m.AppVersion))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *HashedParams) 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 *HashedParams) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *HashedParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.BlockMaxGas != 0 {
|
|
i = encodeVarintParams(dAtA, i, uint64(m.BlockMaxGas))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.BlockMaxBytes != 0 {
|
|
i = encodeVarintParams(dAtA, i, uint64(m.BlockMaxBytes))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
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
|
|
if m.Precision != nil {
|
|
n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Precision, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Precision):])
|
|
if err8 != nil {
|
|
return 0, err8
|
|
}
|
|
i -= n8
|
|
i = encodeVarintParams(dAtA, i, uint64(n8))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.MessageDelay != nil {
|
|
n9, err9 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.MessageDelay, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MessageDelay):])
|
|
if err9 != nil {
|
|
return 0, err9
|
|
}
|
|
i -= n9
|
|
i = encodeVarintParams(dAtA, i, uint64(n9))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TimeoutParams) 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 *TimeoutParams) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TimeoutParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.BypassCommitTimeout {
|
|
i--
|
|
if m.BypassCommitTimeout {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x30
|
|
}
|
|
if m.Commit != nil {
|
|
n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Commit, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Commit):])
|
|
if err10 != nil {
|
|
return 0, err10
|
|
}
|
|
i -= n10
|
|
i = encodeVarintParams(dAtA, i, uint64(n10))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
if m.VoteDelta != nil {
|
|
n11, err11 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.VoteDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta):])
|
|
if err11 != nil {
|
|
return 0, err11
|
|
}
|
|
i -= n11
|
|
i = encodeVarintParams(dAtA, i, uint64(n11))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if m.Vote != nil {
|
|
n12, err12 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Vote, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Vote):])
|
|
if err12 != nil {
|
|
return 0, err12
|
|
}
|
|
i -= n12
|
|
i = encodeVarintParams(dAtA, i, uint64(n12))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.ProposeDelta != nil {
|
|
n13, err13 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.ProposeDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ProposeDelta):])
|
|
if err13 != nil {
|
|
return 0, err13
|
|
}
|
|
i -= n13
|
|
i = encodeVarintParams(dAtA, i, uint64(n13))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Propose != nil {
|
|
n14, err14 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Propose, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Propose):])
|
|
if err14 != nil {
|
|
return 0, err14
|
|
}
|
|
i -= n14
|
|
i = encodeVarintParams(dAtA, i, uint64(n14))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintParams(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovParams(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *ConsensusParams) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Block != nil {
|
|
l = m.Block.Size()
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.Evidence != nil {
|
|
l = m.Evidence.Size()
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.Validator != nil {
|
|
l = m.Validator.Size()
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.Version != nil {
|
|
l = m.Version.Size()
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.Synchrony != nil {
|
|
l = m.Synchrony.Size()
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.Timeout != nil {
|
|
l = m.Timeout.Size()
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *BlockParams) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.MaxBytes != 0 {
|
|
n += 1 + sovParams(uint64(m.MaxBytes))
|
|
}
|
|
if m.MaxGas != 0 {
|
|
n += 1 + sovParams(uint64(m.MaxGas))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *EvidenceParams) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.MaxAgeNumBlocks != 0 {
|
|
n += 1 + sovParams(uint64(m.MaxAgeNumBlocks))
|
|
}
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration)
|
|
n += 1 + l + sovParams(uint64(l))
|
|
if m.MaxBytes != 0 {
|
|
n += 1 + sovParams(uint64(m.MaxBytes))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ValidatorParams) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.PubKeyTypes) > 0 {
|
|
for _, s := range m.PubKeyTypes {
|
|
l = len(s)
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *VersionParams) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.AppVersion != 0 {
|
|
n += 1 + sovParams(uint64(m.AppVersion))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *HashedParams) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.BlockMaxBytes != 0 {
|
|
n += 1 + sovParams(uint64(m.BlockMaxBytes))
|
|
}
|
|
if m.BlockMaxGas != 0 {
|
|
n += 1 + sovParams(uint64(m.BlockMaxGas))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *SynchronyParams) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.MessageDelay != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MessageDelay)
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.Precision != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Precision)
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TimeoutParams) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Propose != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Propose)
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.ProposeDelta != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ProposeDelta)
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.Vote != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Vote)
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.VoteDelta != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta)
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.Commit != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Commit)
|
|
n += 1 + l + sovParams(uint64(l))
|
|
}
|
|
if m.BypassCommitTimeout {
|
|
n += 2
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovParams(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozParams(x uint64) (n int) {
|
|
return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *ConsensusParams) 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: ConsensusParams: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Block", 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.Block == nil {
|
|
m.Block = &BlockParams{}
|
|
}
|
|
if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Evidence", 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.Evidence == nil {
|
|
m.Evidence = &EvidenceParams{}
|
|
}
|
|
if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator == nil {
|
|
m.Validator = &ValidatorParams{}
|
|
}
|
|
if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version == nil {
|
|
m.Version = &VersionParams{}
|
|
}
|
|
if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
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
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Timeout", 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.Timeout == nil {
|
|
m.Timeout = &TimeoutParams{}
|
|
}
|
|
if err := m.Timeout.Unmarshal(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 (m *BlockParams) 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: BlockParams: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType)
|
|
}
|
|
m.MaxBytes = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowParams
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.MaxBytes |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType)
|
|
}
|
|
m.MaxGas = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowParams
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.MaxGas |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
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 (m *EvidenceParams) 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: EvidenceParams: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: EvidenceParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxAgeNumBlocks", wireType)
|
|
}
|
|
m.MaxAgeNumBlocks = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowParams
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.MaxAgeNumBlocks |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxAgeDuration", 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.MaxAgeDuration, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType)
|
|
}
|
|
m.MaxBytes = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowParams
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.MaxBytes |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
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 (m *ValidatorParams) 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: ValidatorParams: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ValidatorParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field PubKeyTypes", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowParams
|
|
}
|
|
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 ErrInvalidLengthParams
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthParams
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.PubKeyTypes = append(m.PubKeyTypes, string(dAtA[iNdEx:postIndex]))
|
|
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 (m *VersionParams) 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: VersionParams: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: VersionParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType)
|
|
}
|
|
m.AppVersion = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowParams
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.AppVersion |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
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 (m *HashedParams) 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: HashedParams: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: HashedParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxBytes", wireType)
|
|
}
|
|
m.BlockMaxBytes = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowParams
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.BlockMaxBytes |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType)
|
|
}
|
|
m.BlockMaxGas = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowParams
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.BlockMaxGas |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
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 (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 m.MessageDelay == nil {
|
|
m.MessageDelay = new(time.Duration)
|
|
}
|
|
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 m.Precision == nil {
|
|
m.Precision = new(time.Duration)
|
|
}
|
|
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 (m *TimeoutParams) 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: TimeoutParams: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: TimeoutParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Propose", 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.Propose == nil {
|
|
m.Propose = new(time.Duration)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Propose, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ProposeDelta", 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.ProposeDelta == nil {
|
|
m.ProposeDelta = new(time.Duration)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.ProposeDelta, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Vote", 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.Vote == nil {
|
|
m.Vote = new(time.Duration)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Vote, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field VoteDelta", 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.VoteDelta == nil {
|
|
m.VoteDelta = new(time.Duration)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.VoteDelta, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Commit", 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.Commit == nil {
|
|
m.Commit = new(time.Duration)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Commit, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field BypassCommitTimeout", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowParams
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.BypassCommitTimeout = bool(v != 0)
|
|
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
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowParams
|
|
}
|
|
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, ErrIntOverflowParams
|
|
}
|
|
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, ErrIntOverflowParams
|
|
}
|
|
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, ErrInvalidLengthParams
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupParams
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthParams
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowParams = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
|
|
)
|