You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2643 lines
65 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: tendermint/types/params.proto
  3. package types
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
  9. _ "github.com/golang/protobuf/ptypes/duration"
  10. io "io"
  11. math "math"
  12. math_bits "math/bits"
  13. time "time"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. var _ = time.Kitchen
  20. // This is a compile-time assertion to ensure that this generated file
  21. // is compatible with the proto package it is being compiled against.
  22. // A compilation error at this line likely means your copy of the
  23. // proto package needs to be updated.
  24. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  25. // ConsensusParams contains consensus critical parameters that determine the
  26. // validity of blocks.
  27. type ConsensusParams struct {
  28. Block *BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
  29. Evidence *EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"`
  30. Validator *ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"`
  31. Version *VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
  32. Synchrony *SynchronyParams `protobuf:"bytes,5,opt,name=synchrony,proto3" json:"synchrony,omitempty"`
  33. Timeout *TimeoutParams `protobuf:"bytes,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
  34. }
  35. func (m *ConsensusParams) Reset() { *m = ConsensusParams{} }
  36. func (m *ConsensusParams) String() string { return proto.CompactTextString(m) }
  37. func (*ConsensusParams) ProtoMessage() {}
  38. func (*ConsensusParams) Descriptor() ([]byte, []int) {
  39. return fileDescriptor_e12598271a686f57, []int{0}
  40. }
  41. func (m *ConsensusParams) XXX_Unmarshal(b []byte) error {
  42. return m.Unmarshal(b)
  43. }
  44. func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  45. if deterministic {
  46. return xxx_messageInfo_ConsensusParams.Marshal(b, m, deterministic)
  47. } else {
  48. b = b[:cap(b)]
  49. n, err := m.MarshalToSizedBuffer(b)
  50. if err != nil {
  51. return nil, err
  52. }
  53. return b[:n], nil
  54. }
  55. }
  56. func (m *ConsensusParams) XXX_Merge(src proto.Message) {
  57. xxx_messageInfo_ConsensusParams.Merge(m, src)
  58. }
  59. func (m *ConsensusParams) XXX_Size() int {
  60. return m.Size()
  61. }
  62. func (m *ConsensusParams) XXX_DiscardUnknown() {
  63. xxx_messageInfo_ConsensusParams.DiscardUnknown(m)
  64. }
  65. var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo
  66. func (m *ConsensusParams) GetBlock() *BlockParams {
  67. if m != nil {
  68. return m.Block
  69. }
  70. return nil
  71. }
  72. func (m *ConsensusParams) GetEvidence() *EvidenceParams {
  73. if m != nil {
  74. return m.Evidence
  75. }
  76. return nil
  77. }
  78. func (m *ConsensusParams) GetValidator() *ValidatorParams {
  79. if m != nil {
  80. return m.Validator
  81. }
  82. return nil
  83. }
  84. func (m *ConsensusParams) GetVersion() *VersionParams {
  85. if m != nil {
  86. return m.Version
  87. }
  88. return nil
  89. }
  90. func (m *ConsensusParams) GetSynchrony() *SynchronyParams {
  91. if m != nil {
  92. return m.Synchrony
  93. }
  94. return nil
  95. }
  96. func (m *ConsensusParams) GetTimeout() *TimeoutParams {
  97. if m != nil {
  98. return m.Timeout
  99. }
  100. return nil
  101. }
  102. // BlockParams contains limits on the block size.
  103. type BlockParams struct {
  104. // Max block size, in bytes.
  105. // Note: must be greater than 0
  106. MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
  107. // Max gas per block.
  108. // Note: must be greater or equal to -1
  109. MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"`
  110. }
  111. func (m *BlockParams) Reset() { *m = BlockParams{} }
  112. func (m *BlockParams) String() string { return proto.CompactTextString(m) }
  113. func (*BlockParams) ProtoMessage() {}
  114. func (*BlockParams) Descriptor() ([]byte, []int) {
  115. return fileDescriptor_e12598271a686f57, []int{1}
  116. }
  117. func (m *BlockParams) XXX_Unmarshal(b []byte) error {
  118. return m.Unmarshal(b)
  119. }
  120. func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  121. if deterministic {
  122. return xxx_messageInfo_BlockParams.Marshal(b, m, deterministic)
  123. } else {
  124. b = b[:cap(b)]
  125. n, err := m.MarshalToSizedBuffer(b)
  126. if err != nil {
  127. return nil, err
  128. }
  129. return b[:n], nil
  130. }
  131. }
  132. func (m *BlockParams) XXX_Merge(src proto.Message) {
  133. xxx_messageInfo_BlockParams.Merge(m, src)
  134. }
  135. func (m *BlockParams) XXX_Size() int {
  136. return m.Size()
  137. }
  138. func (m *BlockParams) XXX_DiscardUnknown() {
  139. xxx_messageInfo_BlockParams.DiscardUnknown(m)
  140. }
  141. var xxx_messageInfo_BlockParams proto.InternalMessageInfo
  142. func (m *BlockParams) GetMaxBytes() int64 {
  143. if m != nil {
  144. return m.MaxBytes
  145. }
  146. return 0
  147. }
  148. func (m *BlockParams) GetMaxGas() int64 {
  149. if m != nil {
  150. return m.MaxGas
  151. }
  152. return 0
  153. }
  154. // EvidenceParams determine how we handle evidence of malfeasance.
  155. type EvidenceParams struct {
  156. // Max age of evidence, in blocks.
  157. //
  158. // The basic formula for calculating this is: MaxAgeDuration / {average block
  159. // time}.
  160. MaxAgeNumBlocks int64 `protobuf:"varint,1,opt,name=max_age_num_blocks,json=maxAgeNumBlocks,proto3" json:"max_age_num_blocks,omitempty"`
  161. // Max age of evidence, in time.
  162. //
  163. // It should correspond with an app's "unbonding period" or other similar
  164. // mechanism for handling [Nothing-At-Stake
  165. // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
  166. MaxAgeDuration time.Duration `protobuf:"bytes,2,opt,name=max_age_duration,json=maxAgeDuration,proto3,stdduration" json:"max_age_duration"`
  167. // This sets the maximum size of total evidence in bytes that can be committed
  168. // in a single block. and should fall comfortably under the max block bytes.
  169. // Default is 1048576 or 1MB
  170. MaxBytes int64 `protobuf:"varint,3,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
  171. }
  172. func (m *EvidenceParams) Reset() { *m = EvidenceParams{} }
  173. func (m *EvidenceParams) String() string { return proto.CompactTextString(m) }
  174. func (*EvidenceParams) ProtoMessage() {}
  175. func (*EvidenceParams) Descriptor() ([]byte, []int) {
  176. return fileDescriptor_e12598271a686f57, []int{2}
  177. }
  178. func (m *EvidenceParams) XXX_Unmarshal(b []byte) error {
  179. return m.Unmarshal(b)
  180. }
  181. func (m *EvidenceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  182. if deterministic {
  183. return xxx_messageInfo_EvidenceParams.Marshal(b, m, deterministic)
  184. } else {
  185. b = b[:cap(b)]
  186. n, err := m.MarshalToSizedBuffer(b)
  187. if err != nil {
  188. return nil, err
  189. }
  190. return b[:n], nil
  191. }
  192. }
  193. func (m *EvidenceParams) XXX_Merge(src proto.Message) {
  194. xxx_messageInfo_EvidenceParams.Merge(m, src)
  195. }
  196. func (m *EvidenceParams) XXX_Size() int {
  197. return m.Size()
  198. }
  199. func (m *EvidenceParams) XXX_DiscardUnknown() {
  200. xxx_messageInfo_EvidenceParams.DiscardUnknown(m)
  201. }
  202. var xxx_messageInfo_EvidenceParams proto.InternalMessageInfo
  203. func (m *EvidenceParams) GetMaxAgeNumBlocks() int64 {
  204. if m != nil {
  205. return m.MaxAgeNumBlocks
  206. }
  207. return 0
  208. }
  209. func (m *EvidenceParams) GetMaxAgeDuration() time.Duration {
  210. if m != nil {
  211. return m.MaxAgeDuration
  212. }
  213. return 0
  214. }
  215. func (m *EvidenceParams) GetMaxBytes() int64 {
  216. if m != nil {
  217. return m.MaxBytes
  218. }
  219. return 0
  220. }
  221. // ValidatorParams restrict the public key types validators can use.
  222. // NOTE: uses ABCI pubkey naming, not Amino names.
  223. type ValidatorParams struct {
  224. PubKeyTypes []string `protobuf:"bytes,1,rep,name=pub_key_types,json=pubKeyTypes,proto3" json:"pub_key_types,omitempty"`
  225. }
  226. func (m *ValidatorParams) Reset() { *m = ValidatorParams{} }
  227. func (m *ValidatorParams) String() string { return proto.CompactTextString(m) }
  228. func (*ValidatorParams) ProtoMessage() {}
  229. func (*ValidatorParams) Descriptor() ([]byte, []int) {
  230. return fileDescriptor_e12598271a686f57, []int{3}
  231. }
  232. func (m *ValidatorParams) XXX_Unmarshal(b []byte) error {
  233. return m.Unmarshal(b)
  234. }
  235. func (m *ValidatorParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  236. if deterministic {
  237. return xxx_messageInfo_ValidatorParams.Marshal(b, m, deterministic)
  238. } else {
  239. b = b[:cap(b)]
  240. n, err := m.MarshalToSizedBuffer(b)
  241. if err != nil {
  242. return nil, err
  243. }
  244. return b[:n], nil
  245. }
  246. }
  247. func (m *ValidatorParams) XXX_Merge(src proto.Message) {
  248. xxx_messageInfo_ValidatorParams.Merge(m, src)
  249. }
  250. func (m *ValidatorParams) XXX_Size() int {
  251. return m.Size()
  252. }
  253. func (m *ValidatorParams) XXX_DiscardUnknown() {
  254. xxx_messageInfo_ValidatorParams.DiscardUnknown(m)
  255. }
  256. var xxx_messageInfo_ValidatorParams proto.InternalMessageInfo
  257. func (m *ValidatorParams) GetPubKeyTypes() []string {
  258. if m != nil {
  259. return m.PubKeyTypes
  260. }
  261. return nil
  262. }
  263. // VersionParams contains the ABCI application version.
  264. type VersionParams struct {
  265. AppVersion uint64 `protobuf:"varint,1,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
  266. }
  267. func (m *VersionParams) Reset() { *m = VersionParams{} }
  268. func (m *VersionParams) String() string { return proto.CompactTextString(m) }
  269. func (*VersionParams) ProtoMessage() {}
  270. func (*VersionParams) Descriptor() ([]byte, []int) {
  271. return fileDescriptor_e12598271a686f57, []int{4}
  272. }
  273. func (m *VersionParams) XXX_Unmarshal(b []byte) error {
  274. return m.Unmarshal(b)
  275. }
  276. func (m *VersionParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  277. if deterministic {
  278. return xxx_messageInfo_VersionParams.Marshal(b, m, deterministic)
  279. } else {
  280. b = b[:cap(b)]
  281. n, err := m.MarshalToSizedBuffer(b)
  282. if err != nil {
  283. return nil, err
  284. }
  285. return b[:n], nil
  286. }
  287. }
  288. func (m *VersionParams) XXX_Merge(src proto.Message) {
  289. xxx_messageInfo_VersionParams.Merge(m, src)
  290. }
  291. func (m *VersionParams) XXX_Size() int {
  292. return m.Size()
  293. }
  294. func (m *VersionParams) XXX_DiscardUnknown() {
  295. xxx_messageInfo_VersionParams.DiscardUnknown(m)
  296. }
  297. var xxx_messageInfo_VersionParams proto.InternalMessageInfo
  298. func (m *VersionParams) GetAppVersion() uint64 {
  299. if m != nil {
  300. return m.AppVersion
  301. }
  302. return 0
  303. }
  304. // HashedParams is a subset of ConsensusParams.
  305. //
  306. // It is hashed into the Header.ConsensusHash.
  307. type HashedParams struct {
  308. BlockMaxBytes int64 `protobuf:"varint,1,opt,name=block_max_bytes,json=blockMaxBytes,proto3" json:"block_max_bytes,omitempty"`
  309. BlockMaxGas int64 `protobuf:"varint,2,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"`
  310. }
  311. func (m *HashedParams) Reset() { *m = HashedParams{} }
  312. func (m *HashedParams) String() string { return proto.CompactTextString(m) }
  313. func (*HashedParams) ProtoMessage() {}
  314. func (*HashedParams) Descriptor() ([]byte, []int) {
  315. return fileDescriptor_e12598271a686f57, []int{5}
  316. }
  317. func (m *HashedParams) XXX_Unmarshal(b []byte) error {
  318. return m.Unmarshal(b)
  319. }
  320. func (m *HashedParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  321. if deterministic {
  322. return xxx_messageInfo_HashedParams.Marshal(b, m, deterministic)
  323. } else {
  324. b = b[:cap(b)]
  325. n, err := m.MarshalToSizedBuffer(b)
  326. if err != nil {
  327. return nil, err
  328. }
  329. return b[:n], nil
  330. }
  331. }
  332. func (m *HashedParams) XXX_Merge(src proto.Message) {
  333. xxx_messageInfo_HashedParams.Merge(m, src)
  334. }
  335. func (m *HashedParams) XXX_Size() int {
  336. return m.Size()
  337. }
  338. func (m *HashedParams) XXX_DiscardUnknown() {
  339. xxx_messageInfo_HashedParams.DiscardUnknown(m)
  340. }
  341. var xxx_messageInfo_HashedParams proto.InternalMessageInfo
  342. func (m *HashedParams) GetBlockMaxBytes() int64 {
  343. if m != nil {
  344. return m.BlockMaxBytes
  345. }
  346. return 0
  347. }
  348. func (m *HashedParams) GetBlockMaxGas() int64 {
  349. if m != nil {
  350. return m.BlockMaxGas
  351. }
  352. return 0
  353. }
  354. // SynchronyParams configure the bounds under which a proposed block's timestamp is considered valid.
  355. // These parameters are part of the proposer-based timestamps algorithm. For more information,
  356. // see the specification of proposer-based timestamps:
  357. // https://github.com/tendermint/tendermint/tree/master/spec/consensus/proposer-based-timestamp
  358. type SynchronyParams struct {
  359. // message_delay bounds how long a proposal message may take to reach all validators on a newtork
  360. // and still be considered valid.
  361. MessageDelay *time.Duration `protobuf:"bytes,1,opt,name=message_delay,json=messageDelay,proto3,stdduration" json:"message_delay,omitempty"`
  362. // precision bounds how skewed a proposer's clock may be from any validator
  363. // on the network while still producing valid proposals.
  364. Precision *time.Duration `protobuf:"bytes,2,opt,name=precision,proto3,stdduration" json:"precision,omitempty"`
  365. }
  366. func (m *SynchronyParams) Reset() { *m = SynchronyParams{} }
  367. func (m *SynchronyParams) String() string { return proto.CompactTextString(m) }
  368. func (*SynchronyParams) ProtoMessage() {}
  369. func (*SynchronyParams) Descriptor() ([]byte, []int) {
  370. return fileDescriptor_e12598271a686f57, []int{6}
  371. }
  372. func (m *SynchronyParams) XXX_Unmarshal(b []byte) error {
  373. return m.Unmarshal(b)
  374. }
  375. func (m *SynchronyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  376. if deterministic {
  377. return xxx_messageInfo_SynchronyParams.Marshal(b, m, deterministic)
  378. } else {
  379. b = b[:cap(b)]
  380. n, err := m.MarshalToSizedBuffer(b)
  381. if err != nil {
  382. return nil, err
  383. }
  384. return b[:n], nil
  385. }
  386. }
  387. func (m *SynchronyParams) XXX_Merge(src proto.Message) {
  388. xxx_messageInfo_SynchronyParams.Merge(m, src)
  389. }
  390. func (m *SynchronyParams) XXX_Size() int {
  391. return m.Size()
  392. }
  393. func (m *SynchronyParams) XXX_DiscardUnknown() {
  394. xxx_messageInfo_SynchronyParams.DiscardUnknown(m)
  395. }
  396. var xxx_messageInfo_SynchronyParams proto.InternalMessageInfo
  397. func (m *SynchronyParams) GetMessageDelay() *time.Duration {
  398. if m != nil {
  399. return m.MessageDelay
  400. }
  401. return nil
  402. }
  403. func (m *SynchronyParams) GetPrecision() *time.Duration {
  404. if m != nil {
  405. return m.Precision
  406. }
  407. return nil
  408. }
  409. // TimeoutParams configure the timeouts for the steps of the Tendermint consensus algorithm.
  410. type TimeoutParams struct {
  411. // These fields configure the timeouts for the propose step of the Tendermint
  412. // consensus algorithm: propose is the initial timeout and propose_delta
  413. // determines how much the timeout grows in subsequent rounds.
  414. // For the first round, this propose timeout is used and for every subsequent
  415. // round, the timeout grows by propose_delta.
  416. //
  417. // For example:
  418. // With propose = 10ms, propose_delta = 5ms, the first round's propose phase
  419. // timeout would be 10ms, the second round's would be 15ms, the third 20ms and so on.
  420. //
  421. // If a node waiting for a proposal message does not receive one matching its
  422. // current height and round before this timeout, the node will issue a
  423. // nil prevote for the round and advance to the next step.
  424. Propose *time.Duration `protobuf:"bytes,1,opt,name=propose,proto3,stdduration" json:"propose,omitempty"`
  425. ProposeDelta *time.Duration `protobuf:"bytes,2,opt,name=propose_delta,json=proposeDelta,proto3,stdduration" json:"propose_delta,omitempty"`
  426. // vote along with vote_delta configure the timeout for both of the prevote and
  427. // precommit steps of the Tendermint consensus algorithm.
  428. //
  429. // These parameters influence the vote step timeouts in the the same way that
  430. // the propose and propose_delta parameters do to the proposal step.
  431. //
  432. // The vote timeout does not begin until a quorum of votes has been received. Once
  433. // a quorum of votes has been seen and this timeout elapses, Tendermint will
  434. // procced to the next step of the consensus algorithm. If Tendermint receives
  435. // all of the remaining votes before the end of the timeout, it will proceed
  436. // to the next step immediately.
  437. Vote *time.Duration `protobuf:"bytes,3,opt,name=vote,proto3,stdduration" json:"vote,omitempty"`
  438. VoteDelta *time.Duration `protobuf:"bytes,4,opt,name=vote_delta,json=voteDelta,proto3,stdduration" json:"vote_delta,omitempty"`
  439. // commit configures how long Tendermint will wait after receiving a quorum of
  440. // precommits before beginning consensus for the next height. This can be
  441. // used to allow slow precommits to arrive for inclusion in the next height before progressing.
  442. Commit *time.Duration `protobuf:"bytes,5,opt,name=commit,proto3,stdduration" json:"commit,omitempty"`
  443. // bypass_commit_timeout configures the node to proceed immediately to
  444. // the next height once the node has received all precommits for a block, forgoing
  445. // the remaining commit timeout.
  446. // Setting bypass_commit_timeout false (the default) causes Tendermint to wait
  447. // for the full commit timeout.
  448. BypassCommitTimeout bool `protobuf:"varint,6,opt,name=bypass_commit_timeout,json=bypassCommitTimeout,proto3" json:"bypass_commit_timeout,omitempty"`
  449. }
  450. func (m *TimeoutParams) Reset() { *m = TimeoutParams{} }
  451. func (m *TimeoutParams) String() string { return proto.CompactTextString(m) }
  452. func (*TimeoutParams) ProtoMessage() {}
  453. func (*TimeoutParams) Descriptor() ([]byte, []int) {
  454. return fileDescriptor_e12598271a686f57, []int{7}
  455. }
  456. func (m *TimeoutParams) XXX_Unmarshal(b []byte) error {
  457. return m.Unmarshal(b)
  458. }
  459. func (m *TimeoutParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  460. if deterministic {
  461. return xxx_messageInfo_TimeoutParams.Marshal(b, m, deterministic)
  462. } else {
  463. b = b[:cap(b)]
  464. n, err := m.MarshalToSizedBuffer(b)
  465. if err != nil {
  466. return nil, err
  467. }
  468. return b[:n], nil
  469. }
  470. }
  471. func (m *TimeoutParams) XXX_Merge(src proto.Message) {
  472. xxx_messageInfo_TimeoutParams.Merge(m, src)
  473. }
  474. func (m *TimeoutParams) XXX_Size() int {
  475. return m.Size()
  476. }
  477. func (m *TimeoutParams) XXX_DiscardUnknown() {
  478. xxx_messageInfo_TimeoutParams.DiscardUnknown(m)
  479. }
  480. var xxx_messageInfo_TimeoutParams proto.InternalMessageInfo
  481. func (m *TimeoutParams) GetPropose() *time.Duration {
  482. if m != nil {
  483. return m.Propose
  484. }
  485. return nil
  486. }
  487. func (m *TimeoutParams) GetProposeDelta() *time.Duration {
  488. if m != nil {
  489. return m.ProposeDelta
  490. }
  491. return nil
  492. }
  493. func (m *TimeoutParams) GetVote() *time.Duration {
  494. if m != nil {
  495. return m.Vote
  496. }
  497. return nil
  498. }
  499. func (m *TimeoutParams) GetVoteDelta() *time.Duration {
  500. if m != nil {
  501. return m.VoteDelta
  502. }
  503. return nil
  504. }
  505. func (m *TimeoutParams) GetCommit() *time.Duration {
  506. if m != nil {
  507. return m.Commit
  508. }
  509. return nil
  510. }
  511. func (m *TimeoutParams) GetBypassCommitTimeout() bool {
  512. if m != nil {
  513. return m.BypassCommitTimeout
  514. }
  515. return false
  516. }
  517. func init() {
  518. proto.RegisterType((*ConsensusParams)(nil), "tendermint.types.ConsensusParams")
  519. proto.RegisterType((*BlockParams)(nil), "tendermint.types.BlockParams")
  520. proto.RegisterType((*EvidenceParams)(nil), "tendermint.types.EvidenceParams")
  521. proto.RegisterType((*ValidatorParams)(nil), "tendermint.types.ValidatorParams")
  522. proto.RegisterType((*VersionParams)(nil), "tendermint.types.VersionParams")
  523. proto.RegisterType((*HashedParams)(nil), "tendermint.types.HashedParams")
  524. proto.RegisterType((*SynchronyParams)(nil), "tendermint.types.SynchronyParams")
  525. proto.RegisterType((*TimeoutParams)(nil), "tendermint.types.TimeoutParams")
  526. }
  527. func init() { proto.RegisterFile("tendermint/types/params.proto", fileDescriptor_e12598271a686f57) }
  528. var fileDescriptor_e12598271a686f57 = []byte{
  529. // 680 bytes of a gzipped FileDescriptorProto
  530. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x6e, 0xd3, 0x4a,
  531. 0x14, 0xc6, 0xe3, 0x26, 0x4d, 0x93, 0x93, 0xa6, 0xa9, 0xe6, 0xde, 0xab, 0xeb, 0xdb, 0xab, 0x3a,
  532. 0xc5, 0x0b, 0x54, 0x09, 0xc9, 0x41, 0xad, 0x50, 0x85, 0xc4, 0x1f, 0x91, 0x06, 0x81, 0x84, 0x8a,
  533. 0x90, 0x29, 0x2c, 0xba, 0xb1, 0xc6, 0xc9, 0xe0, 0x5a, 0x8d, 0x3d, 0x96, 0xc7, 0x8e, 0xe2, 0xb7,
  534. 0x60, 0x85, 0x78, 0x04, 0x78, 0x93, 0x2e, 0xbb, 0x64, 0x05, 0x28, 0x7d, 0x03, 0xd6, 0x2c, 0xd0,
  535. 0xfc, 0x6b, 0x9a, 0x94, 0xd2, 0xac, 0xe2, 0xcc, 0xf9, 0x7e, 0xfe, 0x3c, 0xdf, 0x39, 0x33, 0xb0,
  536. 0x99, 0x91, 0x78, 0x40, 0xd2, 0x28, 0x8c, 0xb3, 0x4e, 0x56, 0x24, 0x84, 0x75, 0x12, 0x9c, 0xe2,
  537. 0x88, 0x39, 0x49, 0x4a, 0x33, 0x8a, 0xd6, 0xa7, 0x65, 0x47, 0x94, 0x37, 0xfe, 0x0e, 0x68, 0x40,
  538. 0x45, 0xb1, 0xc3, 0x9f, 0xa4, 0x6e, 0xc3, 0x0a, 0x28, 0x0d, 0x86, 0xa4, 0x23, 0xfe, 0xf9, 0xf9,
  539. 0xbb, 0xce, 0x20, 0x4f, 0x71, 0x16, 0xd2, 0x58, 0xd6, 0xed, 0x9f, 0x4b, 0xd0, 0xda, 0xa7, 0x31,
  540. 0x23, 0x31, 0xcb, 0xd9, 0x2b, 0xe1, 0x80, 0x76, 0x61, 0xd9, 0x1f, 0xd2, 0xfe, 0x89, 0x69, 0x6c,
  541. 0x19, 0xdb, 0x8d, 0x9d, 0x4d, 0x67, 0xde, 0xcb, 0xe9, 0xf2, 0xb2, 0x54, 0xbb, 0x52, 0x8b, 0x1e,
  542. 0x40, 0x8d, 0x8c, 0xc2, 0x01, 0x89, 0xfb, 0xc4, 0x5c, 0x12, 0xdc, 0xd6, 0x55, 0xee, 0xa9, 0x52,
  543. 0x28, 0xf4, 0x82, 0x40, 0x8f, 0xa1, 0x3e, 0xc2, 0xc3, 0x70, 0x80, 0x33, 0x9a, 0x9a, 0x65, 0x81,
  544. 0xdf, 0xba, 0x8a, 0xbf, 0xd5, 0x12, 0xc5, 0x4f, 0x19, 0x74, 0x1f, 0x56, 0x46, 0x24, 0x65, 0x21,
  545. 0x8d, 0xcd, 0x8a, 0xc0, 0xdb, 0xbf, 0xc1, 0xa5, 0x40, 0xc1, 0x5a, 0xcf, 0xbd, 0x59, 0x11, 0xf7,
  546. 0x8f, 0x53, 0x1a, 0x17, 0xe6, 0xf2, 0x75, 0xde, 0xaf, 0xb5, 0x44, 0x7b, 0x5f, 0x30, 0xdc, 0x3b,
  547. 0x0b, 0x23, 0x42, 0xf3, 0xcc, 0xac, 0x5e, 0xe7, 0x7d, 0x28, 0x05, 0xda, 0x5b, 0xe9, 0xed, 0x7d,
  548. 0x68, 0x5c, 0xca, 0x12, 0xfd, 0x0f, 0xf5, 0x08, 0x8f, 0x3d, 0xbf, 0xc8, 0x08, 0x13, 0xe9, 0x97,
  549. 0xdd, 0x5a, 0x84, 0xc7, 0x5d, 0xfe, 0x1f, 0xfd, 0x0b, 0x2b, 0xbc, 0x18, 0x60, 0x26, 0x02, 0x2e,
  550. 0xbb, 0xd5, 0x08, 0x8f, 0x9f, 0x61, 0x66, 0x7f, 0x36, 0x60, 0x6d, 0x36, 0x59, 0x74, 0x07, 0x10,
  551. 0xd7, 0xe2, 0x80, 0x78, 0x71, 0x1e, 0x79, 0xa2, 0x45, 0xfa, 0x8d, 0xad, 0x08, 0x8f, 0x9f, 0x04,
  552. 0xe4, 0x65, 0x1e, 0x09, 0x6b, 0x86, 0x0e, 0x60, 0x5d, 0x8b, 0xf5, 0x74, 0xa8, 0x16, 0xfe, 0xe7,
  553. 0xc8, 0xf1, 0x71, 0xf4, 0xf8, 0x38, 0x3d, 0x25, 0xe8, 0xd6, 0x4e, 0xbf, 0xb6, 0x4b, 0x1f, 0xbf,
  554. 0xb5, 0x0d, 0x77, 0x4d, 0xbe, 0x4f, 0x57, 0x66, 0x37, 0x51, 0x9e, 0xdd, 0x84, 0x7d, 0x0f, 0x5a,
  555. 0x73, 0x5d, 0x44, 0x36, 0x34, 0x93, 0xdc, 0xf7, 0x4e, 0x48, 0xe1, 0x89, 0xac, 0x4c, 0x63, 0xab,
  556. 0xbc, 0x5d, 0x77, 0x1b, 0x49, 0xee, 0xbf, 0x20, 0xc5, 0x21, 0x5f, 0xb2, 0xef, 0x42, 0x73, 0xa6,
  557. 0x7b, 0xa8, 0x0d, 0x0d, 0x9c, 0x24, 0x9e, 0xee, 0x39, 0xdf, 0x59, 0xc5, 0x05, 0x9c, 0x24, 0x4a,
  558. 0x66, 0x1f, 0xc1, 0xea, 0x73, 0xcc, 0x8e, 0xc9, 0x40, 0x01, 0xb7, 0xa1, 0x25, 0x52, 0xf0, 0xe6,
  559. 0x03, 0x6e, 0x8a, 0xe5, 0x03, 0x9d, 0xb2, 0x0d, 0xcd, 0xa9, 0x6e, 0x9a, 0x75, 0x43, 0xab, 0x78,
  560. 0xe0, 0x1f, 0x0c, 0x68, 0xcd, 0xcd, 0x03, 0xea, 0x41, 0x33, 0x22, 0x8c, 0x89, 0x10, 0xc9, 0x10,
  561. 0x17, 0xea, 0xf0, 0xfc, 0x21, 0xc1, 0x8a, 0x48, 0x6f, 0x55, 0x51, 0x3d, 0x0e, 0xa1, 0x87, 0x50,
  562. 0x4f, 0x52, 0xd2, 0x0f, 0xd9, 0x42, 0x3d, 0x90, 0x6f, 0x98, 0x12, 0xf6, 0x8f, 0x25, 0x68, 0xce,
  563. 0x4c, 0x1a, 0x9f, 0xcd, 0x24, 0xa5, 0x09, 0x65, 0x64, 0xd1, 0x0f, 0xd2, 0x7a, 0xbe, 0x23, 0xf5,
  564. 0xc8, 0x77, 0x94, 0xe1, 0x45, 0xbf, 0x67, 0x55, 0x51, 0x3d, 0x0e, 0xa1, 0x5d, 0xa8, 0x8c, 0x68,
  565. 0x46, 0xd4, 0xa1, 0xbe, 0x11, 0x16, 0x62, 0xf4, 0x08, 0x80, 0xff, 0x2a, 0xdf, 0xca, 0x82, 0x39,
  566. 0x70, 0x44, 0x9a, 0xee, 0x41, 0xb5, 0x4f, 0xa3, 0x28, 0xcc, 0xd4, 0x79, 0xbe, 0x91, 0x55, 0x72,
  567. 0xb4, 0x03, 0xff, 0xf8, 0x45, 0x82, 0x19, 0xf3, 0xe4, 0x82, 0x77, 0xf9, 0x60, 0xd7, 0xdc, 0xbf,
  568. 0x64, 0x71, 0x5f, 0xd4, 0x54, 0xd0, 0xdd, 0x37, 0x9f, 0x26, 0x96, 0x71, 0x3a, 0xb1, 0x8c, 0xb3,
  569. 0x89, 0x65, 0x7c, 0x9f, 0x58, 0xc6, 0xfb, 0x73, 0xab, 0x74, 0x76, 0x6e, 0x95, 0xbe, 0x9c, 0x5b,
  570. 0xa5, 0xa3, 0xbd, 0x20, 0xcc, 0x8e, 0x73, 0xdf, 0xe9, 0xd3, 0xa8, 0x73, 0xf9, 0x4a, 0x9f, 0x3e,
  571. 0xca, 0x3b, 0x7b, 0xfe, 0xba, 0xf7, 0xab, 0x62, 0x7d, 0xf7, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff,
  572. 0xfc, 0x06, 0xae, 0x9f, 0x09, 0x06, 0x00, 0x00,
  573. }
  574. func (this *ConsensusParams) Equal(that interface{}) bool {
  575. if that == nil {
  576. return this == nil
  577. }
  578. that1, ok := that.(*ConsensusParams)
  579. if !ok {
  580. that2, ok := that.(ConsensusParams)
  581. if ok {
  582. that1 = &that2
  583. } else {
  584. return false
  585. }
  586. }
  587. if that1 == nil {
  588. return this == nil
  589. } else if this == nil {
  590. return false
  591. }
  592. if !this.Block.Equal(that1.Block) {
  593. return false
  594. }
  595. if !this.Evidence.Equal(that1.Evidence) {
  596. return false
  597. }
  598. if !this.Validator.Equal(that1.Validator) {
  599. return false
  600. }
  601. if !this.Version.Equal(that1.Version) {
  602. return false
  603. }
  604. if !this.Synchrony.Equal(that1.Synchrony) {
  605. return false
  606. }
  607. if !this.Timeout.Equal(that1.Timeout) {
  608. return false
  609. }
  610. return true
  611. }
  612. func (this *BlockParams) Equal(that interface{}) bool {
  613. if that == nil {
  614. return this == nil
  615. }
  616. that1, ok := that.(*BlockParams)
  617. if !ok {
  618. that2, ok := that.(BlockParams)
  619. if ok {
  620. that1 = &that2
  621. } else {
  622. return false
  623. }
  624. }
  625. if that1 == nil {
  626. return this == nil
  627. } else if this == nil {
  628. return false
  629. }
  630. if this.MaxBytes != that1.MaxBytes {
  631. return false
  632. }
  633. if this.MaxGas != that1.MaxGas {
  634. return false
  635. }
  636. return true
  637. }
  638. func (this *EvidenceParams) Equal(that interface{}) bool {
  639. if that == nil {
  640. return this == nil
  641. }
  642. that1, ok := that.(*EvidenceParams)
  643. if !ok {
  644. that2, ok := that.(EvidenceParams)
  645. if ok {
  646. that1 = &that2
  647. } else {
  648. return false
  649. }
  650. }
  651. if that1 == nil {
  652. return this == nil
  653. } else if this == nil {
  654. return false
  655. }
  656. if this.MaxAgeNumBlocks != that1.MaxAgeNumBlocks {
  657. return false
  658. }
  659. if this.MaxAgeDuration != that1.MaxAgeDuration {
  660. return false
  661. }
  662. if this.MaxBytes != that1.MaxBytes {
  663. return false
  664. }
  665. return true
  666. }
  667. func (this *ValidatorParams) Equal(that interface{}) bool {
  668. if that == nil {
  669. return this == nil
  670. }
  671. that1, ok := that.(*ValidatorParams)
  672. if !ok {
  673. that2, ok := that.(ValidatorParams)
  674. if ok {
  675. that1 = &that2
  676. } else {
  677. return false
  678. }
  679. }
  680. if that1 == nil {
  681. return this == nil
  682. } else if this == nil {
  683. return false
  684. }
  685. if len(this.PubKeyTypes) != len(that1.PubKeyTypes) {
  686. return false
  687. }
  688. for i := range this.PubKeyTypes {
  689. if this.PubKeyTypes[i] != that1.PubKeyTypes[i] {
  690. return false
  691. }
  692. }
  693. return true
  694. }
  695. func (this *VersionParams) Equal(that interface{}) bool {
  696. if that == nil {
  697. return this == nil
  698. }
  699. that1, ok := that.(*VersionParams)
  700. if !ok {
  701. that2, ok := that.(VersionParams)
  702. if ok {
  703. that1 = &that2
  704. } else {
  705. return false
  706. }
  707. }
  708. if that1 == nil {
  709. return this == nil
  710. } else if this == nil {
  711. return false
  712. }
  713. if this.AppVersion != that1.AppVersion {
  714. return false
  715. }
  716. return true
  717. }
  718. func (this *HashedParams) Equal(that interface{}) bool {
  719. if that == nil {
  720. return this == nil
  721. }
  722. that1, ok := that.(*HashedParams)
  723. if !ok {
  724. that2, ok := that.(HashedParams)
  725. if ok {
  726. that1 = &that2
  727. } else {
  728. return false
  729. }
  730. }
  731. if that1 == nil {
  732. return this == nil
  733. } else if this == nil {
  734. return false
  735. }
  736. if this.BlockMaxBytes != that1.BlockMaxBytes {
  737. return false
  738. }
  739. if this.BlockMaxGas != that1.BlockMaxGas {
  740. return false
  741. }
  742. return true
  743. }
  744. func (this *SynchronyParams) Equal(that interface{}) bool {
  745. if that == nil {
  746. return this == nil
  747. }
  748. that1, ok := that.(*SynchronyParams)
  749. if !ok {
  750. that2, ok := that.(SynchronyParams)
  751. if ok {
  752. that1 = &that2
  753. } else {
  754. return false
  755. }
  756. }
  757. if that1 == nil {
  758. return this == nil
  759. } else if this == nil {
  760. return false
  761. }
  762. if this.MessageDelay != nil && that1.MessageDelay != nil {
  763. if *this.MessageDelay != *that1.MessageDelay {
  764. return false
  765. }
  766. } else if this.MessageDelay != nil {
  767. return false
  768. } else if that1.MessageDelay != nil {
  769. return false
  770. }
  771. if this.Precision != nil && that1.Precision != nil {
  772. if *this.Precision != *that1.Precision {
  773. return false
  774. }
  775. } else if this.Precision != nil {
  776. return false
  777. } else if that1.Precision != nil {
  778. return false
  779. }
  780. return true
  781. }
  782. func (this *TimeoutParams) Equal(that interface{}) bool {
  783. if that == nil {
  784. return this == nil
  785. }
  786. that1, ok := that.(*TimeoutParams)
  787. if !ok {
  788. that2, ok := that.(TimeoutParams)
  789. if ok {
  790. that1 = &that2
  791. } else {
  792. return false
  793. }
  794. }
  795. if that1 == nil {
  796. return this == nil
  797. } else if this == nil {
  798. return false
  799. }
  800. if this.Propose != nil && that1.Propose != nil {
  801. if *this.Propose != *that1.Propose {
  802. return false
  803. }
  804. } else if this.Propose != nil {
  805. return false
  806. } else if that1.Propose != nil {
  807. return false
  808. }
  809. if this.ProposeDelta != nil && that1.ProposeDelta != nil {
  810. if *this.ProposeDelta != *that1.ProposeDelta {
  811. return false
  812. }
  813. } else if this.ProposeDelta != nil {
  814. return false
  815. } else if that1.ProposeDelta != nil {
  816. return false
  817. }
  818. if this.Vote != nil && that1.Vote != nil {
  819. if *this.Vote != *that1.Vote {
  820. return false
  821. }
  822. } else if this.Vote != nil {
  823. return false
  824. } else if that1.Vote != nil {
  825. return false
  826. }
  827. if this.VoteDelta != nil && that1.VoteDelta != nil {
  828. if *this.VoteDelta != *that1.VoteDelta {
  829. return false
  830. }
  831. } else if this.VoteDelta != nil {
  832. return false
  833. } else if that1.VoteDelta != nil {
  834. return false
  835. }
  836. if this.Commit != nil && that1.Commit != nil {
  837. if *this.Commit != *that1.Commit {
  838. return false
  839. }
  840. } else if this.Commit != nil {
  841. return false
  842. } else if that1.Commit != nil {
  843. return false
  844. }
  845. if this.BypassCommitTimeout != that1.BypassCommitTimeout {
  846. return false
  847. }
  848. return true
  849. }
  850. func (m *ConsensusParams) Marshal() (dAtA []byte, err error) {
  851. size := m.Size()
  852. dAtA = make([]byte, size)
  853. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  854. if err != nil {
  855. return nil, err
  856. }
  857. return dAtA[:n], nil
  858. }
  859. func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) {
  860. size := m.Size()
  861. return m.MarshalToSizedBuffer(dAtA[:size])
  862. }
  863. func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  864. i := len(dAtA)
  865. _ = i
  866. var l int
  867. _ = l
  868. if m.Timeout != nil {
  869. {
  870. size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i])
  871. if err != nil {
  872. return 0, err
  873. }
  874. i -= size
  875. i = encodeVarintParams(dAtA, i, uint64(size))
  876. }
  877. i--
  878. dAtA[i] = 0x32
  879. }
  880. if m.Synchrony != nil {
  881. {
  882. size, err := m.Synchrony.MarshalToSizedBuffer(dAtA[:i])
  883. if err != nil {
  884. return 0, err
  885. }
  886. i -= size
  887. i = encodeVarintParams(dAtA, i, uint64(size))
  888. }
  889. i--
  890. dAtA[i] = 0x2a
  891. }
  892. if m.Version != nil {
  893. {
  894. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  895. if err != nil {
  896. return 0, err
  897. }
  898. i -= size
  899. i = encodeVarintParams(dAtA, i, uint64(size))
  900. }
  901. i--
  902. dAtA[i] = 0x22
  903. }
  904. if m.Validator != nil {
  905. {
  906. size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i])
  907. if err != nil {
  908. return 0, err
  909. }
  910. i -= size
  911. i = encodeVarintParams(dAtA, i, uint64(size))
  912. }
  913. i--
  914. dAtA[i] = 0x1a
  915. }
  916. if m.Evidence != nil {
  917. {
  918. size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
  919. if err != nil {
  920. return 0, err
  921. }
  922. i -= size
  923. i = encodeVarintParams(dAtA, i, uint64(size))
  924. }
  925. i--
  926. dAtA[i] = 0x12
  927. }
  928. if m.Block != nil {
  929. {
  930. size, err := m.Block.MarshalToSizedBuffer(dAtA[:i])
  931. if err != nil {
  932. return 0, err
  933. }
  934. i -= size
  935. i = encodeVarintParams(dAtA, i, uint64(size))
  936. }
  937. i--
  938. dAtA[i] = 0xa
  939. }
  940. return len(dAtA) - i, nil
  941. }
  942. func (m *BlockParams) Marshal() (dAtA []byte, err error) {
  943. size := m.Size()
  944. dAtA = make([]byte, size)
  945. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  946. if err != nil {
  947. return nil, err
  948. }
  949. return dAtA[:n], nil
  950. }
  951. func (m *BlockParams) MarshalTo(dAtA []byte) (int, error) {
  952. size := m.Size()
  953. return m.MarshalToSizedBuffer(dAtA[:size])
  954. }
  955. func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  956. i := len(dAtA)
  957. _ = i
  958. var l int
  959. _ = l
  960. if m.MaxGas != 0 {
  961. i = encodeVarintParams(dAtA, i, uint64(m.MaxGas))
  962. i--
  963. dAtA[i] = 0x10
  964. }
  965. if m.MaxBytes != 0 {
  966. i = encodeVarintParams(dAtA, i, uint64(m.MaxBytes))
  967. i--
  968. dAtA[i] = 0x8
  969. }
  970. return len(dAtA) - i, nil
  971. }
  972. func (m *EvidenceParams) Marshal() (dAtA []byte, err error) {
  973. size := m.Size()
  974. dAtA = make([]byte, size)
  975. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  976. if err != nil {
  977. return nil, err
  978. }
  979. return dAtA[:n], nil
  980. }
  981. func (m *EvidenceParams) MarshalTo(dAtA []byte) (int, error) {
  982. size := m.Size()
  983. return m.MarshalToSizedBuffer(dAtA[:size])
  984. }
  985. func (m *EvidenceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  986. i := len(dAtA)
  987. _ = i
  988. var l int
  989. _ = l
  990. if m.MaxBytes != 0 {
  991. i = encodeVarintParams(dAtA, i, uint64(m.MaxBytes))
  992. i--
  993. dAtA[i] = 0x18
  994. }
  995. n7, err7 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):])
  996. if err7 != nil {
  997. return 0, err7
  998. }
  999. i -= n7
  1000. i = encodeVarintParams(dAtA, i, uint64(n7))
  1001. i--
  1002. dAtA[i] = 0x12
  1003. if m.MaxAgeNumBlocks != 0 {
  1004. i = encodeVarintParams(dAtA, i, uint64(m.MaxAgeNumBlocks))
  1005. i--
  1006. dAtA[i] = 0x8
  1007. }
  1008. return len(dAtA) - i, nil
  1009. }
  1010. func (m *ValidatorParams) Marshal() (dAtA []byte, err error) {
  1011. size := m.Size()
  1012. dAtA = make([]byte, size)
  1013. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1014. if err != nil {
  1015. return nil, err
  1016. }
  1017. return dAtA[:n], nil
  1018. }
  1019. func (m *ValidatorParams) MarshalTo(dAtA []byte) (int, error) {
  1020. size := m.Size()
  1021. return m.MarshalToSizedBuffer(dAtA[:size])
  1022. }
  1023. func (m *ValidatorParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1024. i := len(dAtA)
  1025. _ = i
  1026. var l int
  1027. _ = l
  1028. if len(m.PubKeyTypes) > 0 {
  1029. for iNdEx := len(m.PubKeyTypes) - 1; iNdEx >= 0; iNdEx-- {
  1030. i -= len(m.PubKeyTypes[iNdEx])
  1031. copy(dAtA[i:], m.PubKeyTypes[iNdEx])
  1032. i = encodeVarintParams(dAtA, i, uint64(len(m.PubKeyTypes[iNdEx])))
  1033. i--
  1034. dAtA[i] = 0xa
  1035. }
  1036. }
  1037. return len(dAtA) - i, nil
  1038. }
  1039. func (m *VersionParams) Marshal() (dAtA []byte, err error) {
  1040. size := m.Size()
  1041. dAtA = make([]byte, size)
  1042. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1043. if err != nil {
  1044. return nil, err
  1045. }
  1046. return dAtA[:n], nil
  1047. }
  1048. func (m *VersionParams) MarshalTo(dAtA []byte) (int, error) {
  1049. size := m.Size()
  1050. return m.MarshalToSizedBuffer(dAtA[:size])
  1051. }
  1052. func (m *VersionParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1053. i := len(dAtA)
  1054. _ = i
  1055. var l int
  1056. _ = l
  1057. if m.AppVersion != 0 {
  1058. i = encodeVarintParams(dAtA, i, uint64(m.AppVersion))
  1059. i--
  1060. dAtA[i] = 0x8
  1061. }
  1062. return len(dAtA) - i, nil
  1063. }
  1064. func (m *HashedParams) Marshal() (dAtA []byte, err error) {
  1065. size := m.Size()
  1066. dAtA = make([]byte, size)
  1067. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1068. if err != nil {
  1069. return nil, err
  1070. }
  1071. return dAtA[:n], nil
  1072. }
  1073. func (m *HashedParams) MarshalTo(dAtA []byte) (int, error) {
  1074. size := m.Size()
  1075. return m.MarshalToSizedBuffer(dAtA[:size])
  1076. }
  1077. func (m *HashedParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1078. i := len(dAtA)
  1079. _ = i
  1080. var l int
  1081. _ = l
  1082. if m.BlockMaxGas != 0 {
  1083. i = encodeVarintParams(dAtA, i, uint64(m.BlockMaxGas))
  1084. i--
  1085. dAtA[i] = 0x10
  1086. }
  1087. if m.BlockMaxBytes != 0 {
  1088. i = encodeVarintParams(dAtA, i, uint64(m.BlockMaxBytes))
  1089. i--
  1090. dAtA[i] = 0x8
  1091. }
  1092. return len(dAtA) - i, nil
  1093. }
  1094. func (m *SynchronyParams) Marshal() (dAtA []byte, err error) {
  1095. size := m.Size()
  1096. dAtA = make([]byte, size)
  1097. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1098. if err != nil {
  1099. return nil, err
  1100. }
  1101. return dAtA[:n], nil
  1102. }
  1103. func (m *SynchronyParams) MarshalTo(dAtA []byte) (int, error) {
  1104. size := m.Size()
  1105. return m.MarshalToSizedBuffer(dAtA[:size])
  1106. }
  1107. func (m *SynchronyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1108. i := len(dAtA)
  1109. _ = i
  1110. var l int
  1111. _ = l
  1112. if m.Precision != nil {
  1113. n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Precision, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Precision):])
  1114. if err8 != nil {
  1115. return 0, err8
  1116. }
  1117. i -= n8
  1118. i = encodeVarintParams(dAtA, i, uint64(n8))
  1119. i--
  1120. dAtA[i] = 0x12
  1121. }
  1122. if m.MessageDelay != nil {
  1123. n9, err9 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.MessageDelay, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MessageDelay):])
  1124. if err9 != nil {
  1125. return 0, err9
  1126. }
  1127. i -= n9
  1128. i = encodeVarintParams(dAtA, i, uint64(n9))
  1129. i--
  1130. dAtA[i] = 0xa
  1131. }
  1132. return len(dAtA) - i, nil
  1133. }
  1134. func (m *TimeoutParams) Marshal() (dAtA []byte, err error) {
  1135. size := m.Size()
  1136. dAtA = make([]byte, size)
  1137. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1138. if err != nil {
  1139. return nil, err
  1140. }
  1141. return dAtA[:n], nil
  1142. }
  1143. func (m *TimeoutParams) MarshalTo(dAtA []byte) (int, error) {
  1144. size := m.Size()
  1145. return m.MarshalToSizedBuffer(dAtA[:size])
  1146. }
  1147. func (m *TimeoutParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1148. i := len(dAtA)
  1149. _ = i
  1150. var l int
  1151. _ = l
  1152. if m.BypassCommitTimeout {
  1153. i--
  1154. if m.BypassCommitTimeout {
  1155. dAtA[i] = 1
  1156. } else {
  1157. dAtA[i] = 0
  1158. }
  1159. i--
  1160. dAtA[i] = 0x30
  1161. }
  1162. if m.Commit != nil {
  1163. n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Commit, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Commit):])
  1164. if err10 != nil {
  1165. return 0, err10
  1166. }
  1167. i -= n10
  1168. i = encodeVarintParams(dAtA, i, uint64(n10))
  1169. i--
  1170. dAtA[i] = 0x2a
  1171. }
  1172. if m.VoteDelta != nil {
  1173. n11, err11 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.VoteDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta):])
  1174. if err11 != nil {
  1175. return 0, err11
  1176. }
  1177. i -= n11
  1178. i = encodeVarintParams(dAtA, i, uint64(n11))
  1179. i--
  1180. dAtA[i] = 0x22
  1181. }
  1182. if m.Vote != nil {
  1183. n12, err12 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Vote, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Vote):])
  1184. if err12 != nil {
  1185. return 0, err12
  1186. }
  1187. i -= n12
  1188. i = encodeVarintParams(dAtA, i, uint64(n12))
  1189. i--
  1190. dAtA[i] = 0x1a
  1191. }
  1192. if m.ProposeDelta != nil {
  1193. n13, err13 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.ProposeDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ProposeDelta):])
  1194. if err13 != nil {
  1195. return 0, err13
  1196. }
  1197. i -= n13
  1198. i = encodeVarintParams(dAtA, i, uint64(n13))
  1199. i--
  1200. dAtA[i] = 0x12
  1201. }
  1202. if m.Propose != nil {
  1203. n14, err14 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Propose, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Propose):])
  1204. if err14 != nil {
  1205. return 0, err14
  1206. }
  1207. i -= n14
  1208. i = encodeVarintParams(dAtA, i, uint64(n14))
  1209. i--
  1210. dAtA[i] = 0xa
  1211. }
  1212. return len(dAtA) - i, nil
  1213. }
  1214. func encodeVarintParams(dAtA []byte, offset int, v uint64) int {
  1215. offset -= sovParams(v)
  1216. base := offset
  1217. for v >= 1<<7 {
  1218. dAtA[offset] = uint8(v&0x7f | 0x80)
  1219. v >>= 7
  1220. offset++
  1221. }
  1222. dAtA[offset] = uint8(v)
  1223. return base
  1224. }
  1225. func (m *ConsensusParams) Size() (n int) {
  1226. if m == nil {
  1227. return 0
  1228. }
  1229. var l int
  1230. _ = l
  1231. if m.Block != nil {
  1232. l = m.Block.Size()
  1233. n += 1 + l + sovParams(uint64(l))
  1234. }
  1235. if m.Evidence != nil {
  1236. l = m.Evidence.Size()
  1237. n += 1 + l + sovParams(uint64(l))
  1238. }
  1239. if m.Validator != nil {
  1240. l = m.Validator.Size()
  1241. n += 1 + l + sovParams(uint64(l))
  1242. }
  1243. if m.Version != nil {
  1244. l = m.Version.Size()
  1245. n += 1 + l + sovParams(uint64(l))
  1246. }
  1247. if m.Synchrony != nil {
  1248. l = m.Synchrony.Size()
  1249. n += 1 + l + sovParams(uint64(l))
  1250. }
  1251. if m.Timeout != nil {
  1252. l = m.Timeout.Size()
  1253. n += 1 + l + sovParams(uint64(l))
  1254. }
  1255. return n
  1256. }
  1257. func (m *BlockParams) Size() (n int) {
  1258. if m == nil {
  1259. return 0
  1260. }
  1261. var l int
  1262. _ = l
  1263. if m.MaxBytes != 0 {
  1264. n += 1 + sovParams(uint64(m.MaxBytes))
  1265. }
  1266. if m.MaxGas != 0 {
  1267. n += 1 + sovParams(uint64(m.MaxGas))
  1268. }
  1269. return n
  1270. }
  1271. func (m *EvidenceParams) Size() (n int) {
  1272. if m == nil {
  1273. return 0
  1274. }
  1275. var l int
  1276. _ = l
  1277. if m.MaxAgeNumBlocks != 0 {
  1278. n += 1 + sovParams(uint64(m.MaxAgeNumBlocks))
  1279. }
  1280. l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration)
  1281. n += 1 + l + sovParams(uint64(l))
  1282. if m.MaxBytes != 0 {
  1283. n += 1 + sovParams(uint64(m.MaxBytes))
  1284. }
  1285. return n
  1286. }
  1287. func (m *ValidatorParams) Size() (n int) {
  1288. if m == nil {
  1289. return 0
  1290. }
  1291. var l int
  1292. _ = l
  1293. if len(m.PubKeyTypes) > 0 {
  1294. for _, s := range m.PubKeyTypes {
  1295. l = len(s)
  1296. n += 1 + l + sovParams(uint64(l))
  1297. }
  1298. }
  1299. return n
  1300. }
  1301. func (m *VersionParams) Size() (n int) {
  1302. if m == nil {
  1303. return 0
  1304. }
  1305. var l int
  1306. _ = l
  1307. if m.AppVersion != 0 {
  1308. n += 1 + sovParams(uint64(m.AppVersion))
  1309. }
  1310. return n
  1311. }
  1312. func (m *HashedParams) Size() (n int) {
  1313. if m == nil {
  1314. return 0
  1315. }
  1316. var l int
  1317. _ = l
  1318. if m.BlockMaxBytes != 0 {
  1319. n += 1 + sovParams(uint64(m.BlockMaxBytes))
  1320. }
  1321. if m.BlockMaxGas != 0 {
  1322. n += 1 + sovParams(uint64(m.BlockMaxGas))
  1323. }
  1324. return n
  1325. }
  1326. func (m *SynchronyParams) Size() (n int) {
  1327. if m == nil {
  1328. return 0
  1329. }
  1330. var l int
  1331. _ = l
  1332. if m.MessageDelay != nil {
  1333. l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MessageDelay)
  1334. n += 1 + l + sovParams(uint64(l))
  1335. }
  1336. if m.Precision != nil {
  1337. l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Precision)
  1338. n += 1 + l + sovParams(uint64(l))
  1339. }
  1340. return n
  1341. }
  1342. func (m *TimeoutParams) Size() (n int) {
  1343. if m == nil {
  1344. return 0
  1345. }
  1346. var l int
  1347. _ = l
  1348. if m.Propose != nil {
  1349. l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Propose)
  1350. n += 1 + l + sovParams(uint64(l))
  1351. }
  1352. if m.ProposeDelta != nil {
  1353. l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ProposeDelta)
  1354. n += 1 + l + sovParams(uint64(l))
  1355. }
  1356. if m.Vote != nil {
  1357. l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Vote)
  1358. n += 1 + l + sovParams(uint64(l))
  1359. }
  1360. if m.VoteDelta != nil {
  1361. l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta)
  1362. n += 1 + l + sovParams(uint64(l))
  1363. }
  1364. if m.Commit != nil {
  1365. l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Commit)
  1366. n += 1 + l + sovParams(uint64(l))
  1367. }
  1368. if m.BypassCommitTimeout {
  1369. n += 2
  1370. }
  1371. return n
  1372. }
  1373. func sovParams(x uint64) (n int) {
  1374. return (math_bits.Len64(x|1) + 6) / 7
  1375. }
  1376. func sozParams(x uint64) (n int) {
  1377. return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1378. }
  1379. func (m *ConsensusParams) Unmarshal(dAtA []byte) error {
  1380. l := len(dAtA)
  1381. iNdEx := 0
  1382. for iNdEx < l {
  1383. preIndex := iNdEx
  1384. var wire uint64
  1385. for shift := uint(0); ; shift += 7 {
  1386. if shift >= 64 {
  1387. return ErrIntOverflowParams
  1388. }
  1389. if iNdEx >= l {
  1390. return io.ErrUnexpectedEOF
  1391. }
  1392. b := dAtA[iNdEx]
  1393. iNdEx++
  1394. wire |= uint64(b&0x7F) << shift
  1395. if b < 0x80 {
  1396. break
  1397. }
  1398. }
  1399. fieldNum := int32(wire >> 3)
  1400. wireType := int(wire & 0x7)
  1401. if wireType == 4 {
  1402. return fmt.Errorf("proto: ConsensusParams: wiretype end group for non-group")
  1403. }
  1404. if fieldNum <= 0 {
  1405. return fmt.Errorf("proto: ConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire)
  1406. }
  1407. switch fieldNum {
  1408. case 1:
  1409. if wireType != 2 {
  1410. return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
  1411. }
  1412. var msglen int
  1413. for shift := uint(0); ; shift += 7 {
  1414. if shift >= 64 {
  1415. return ErrIntOverflowParams
  1416. }
  1417. if iNdEx >= l {
  1418. return io.ErrUnexpectedEOF
  1419. }
  1420. b := dAtA[iNdEx]
  1421. iNdEx++
  1422. msglen |= int(b&0x7F) << shift
  1423. if b < 0x80 {
  1424. break
  1425. }
  1426. }
  1427. if msglen < 0 {
  1428. return ErrInvalidLengthParams
  1429. }
  1430. postIndex := iNdEx + msglen
  1431. if postIndex < 0 {
  1432. return ErrInvalidLengthParams
  1433. }
  1434. if postIndex > l {
  1435. return io.ErrUnexpectedEOF
  1436. }
  1437. if m.Block == nil {
  1438. m.Block = &BlockParams{}
  1439. }
  1440. if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1441. return err
  1442. }
  1443. iNdEx = postIndex
  1444. case 2:
  1445. if wireType != 2 {
  1446. return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
  1447. }
  1448. var msglen int
  1449. for shift := uint(0); ; shift += 7 {
  1450. if shift >= 64 {
  1451. return ErrIntOverflowParams
  1452. }
  1453. if iNdEx >= l {
  1454. return io.ErrUnexpectedEOF
  1455. }
  1456. b := dAtA[iNdEx]
  1457. iNdEx++
  1458. msglen |= int(b&0x7F) << shift
  1459. if b < 0x80 {
  1460. break
  1461. }
  1462. }
  1463. if msglen < 0 {
  1464. return ErrInvalidLengthParams
  1465. }
  1466. postIndex := iNdEx + msglen
  1467. if postIndex < 0 {
  1468. return ErrInvalidLengthParams
  1469. }
  1470. if postIndex > l {
  1471. return io.ErrUnexpectedEOF
  1472. }
  1473. if m.Evidence == nil {
  1474. m.Evidence = &EvidenceParams{}
  1475. }
  1476. if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1477. return err
  1478. }
  1479. iNdEx = postIndex
  1480. case 3:
  1481. if wireType != 2 {
  1482. return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType)
  1483. }
  1484. var msglen int
  1485. for shift := uint(0); ; shift += 7 {
  1486. if shift >= 64 {
  1487. return ErrIntOverflowParams
  1488. }
  1489. if iNdEx >= l {
  1490. return io.ErrUnexpectedEOF
  1491. }
  1492. b := dAtA[iNdEx]
  1493. iNdEx++
  1494. msglen |= int(b&0x7F) << shift
  1495. if b < 0x80 {
  1496. break
  1497. }
  1498. }
  1499. if msglen < 0 {
  1500. return ErrInvalidLengthParams
  1501. }
  1502. postIndex := iNdEx + msglen
  1503. if postIndex < 0 {
  1504. return ErrInvalidLengthParams
  1505. }
  1506. if postIndex > l {
  1507. return io.ErrUnexpectedEOF
  1508. }
  1509. if m.Validator == nil {
  1510. m.Validator = &ValidatorParams{}
  1511. }
  1512. if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1513. return err
  1514. }
  1515. iNdEx = postIndex
  1516. case 4:
  1517. if wireType != 2 {
  1518. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1519. }
  1520. var msglen int
  1521. for shift := uint(0); ; shift += 7 {
  1522. if shift >= 64 {
  1523. return ErrIntOverflowParams
  1524. }
  1525. if iNdEx >= l {
  1526. return io.ErrUnexpectedEOF
  1527. }
  1528. b := dAtA[iNdEx]
  1529. iNdEx++
  1530. msglen |= int(b&0x7F) << shift
  1531. if b < 0x80 {
  1532. break
  1533. }
  1534. }
  1535. if msglen < 0 {
  1536. return ErrInvalidLengthParams
  1537. }
  1538. postIndex := iNdEx + msglen
  1539. if postIndex < 0 {
  1540. return ErrInvalidLengthParams
  1541. }
  1542. if postIndex > l {
  1543. return io.ErrUnexpectedEOF
  1544. }
  1545. if m.Version == nil {
  1546. m.Version = &VersionParams{}
  1547. }
  1548. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1549. return err
  1550. }
  1551. iNdEx = postIndex
  1552. case 5:
  1553. if wireType != 2 {
  1554. return fmt.Errorf("proto: wrong wireType = %d for field Synchrony", wireType)
  1555. }
  1556. var msglen int
  1557. for shift := uint(0); ; shift += 7 {
  1558. if shift >= 64 {
  1559. return ErrIntOverflowParams
  1560. }
  1561. if iNdEx >= l {
  1562. return io.ErrUnexpectedEOF
  1563. }
  1564. b := dAtA[iNdEx]
  1565. iNdEx++
  1566. msglen |= int(b&0x7F) << shift
  1567. if b < 0x80 {
  1568. break
  1569. }
  1570. }
  1571. if msglen < 0 {
  1572. return ErrInvalidLengthParams
  1573. }
  1574. postIndex := iNdEx + msglen
  1575. if postIndex < 0 {
  1576. return ErrInvalidLengthParams
  1577. }
  1578. if postIndex > l {
  1579. return io.ErrUnexpectedEOF
  1580. }
  1581. if m.Synchrony == nil {
  1582. m.Synchrony = &SynchronyParams{}
  1583. }
  1584. if err := m.Synchrony.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1585. return err
  1586. }
  1587. iNdEx = postIndex
  1588. case 6:
  1589. if wireType != 2 {
  1590. return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
  1591. }
  1592. var msglen int
  1593. for shift := uint(0); ; shift += 7 {
  1594. if shift >= 64 {
  1595. return ErrIntOverflowParams
  1596. }
  1597. if iNdEx >= l {
  1598. return io.ErrUnexpectedEOF
  1599. }
  1600. b := dAtA[iNdEx]
  1601. iNdEx++
  1602. msglen |= int(b&0x7F) << shift
  1603. if b < 0x80 {
  1604. break
  1605. }
  1606. }
  1607. if msglen < 0 {
  1608. return ErrInvalidLengthParams
  1609. }
  1610. postIndex := iNdEx + msglen
  1611. if postIndex < 0 {
  1612. return ErrInvalidLengthParams
  1613. }
  1614. if postIndex > l {
  1615. return io.ErrUnexpectedEOF
  1616. }
  1617. if m.Timeout == nil {
  1618. m.Timeout = &TimeoutParams{}
  1619. }
  1620. if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1621. return err
  1622. }
  1623. iNdEx = postIndex
  1624. default:
  1625. iNdEx = preIndex
  1626. skippy, err := skipParams(dAtA[iNdEx:])
  1627. if err != nil {
  1628. return err
  1629. }
  1630. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1631. return ErrInvalidLengthParams
  1632. }
  1633. if (iNdEx + skippy) > l {
  1634. return io.ErrUnexpectedEOF
  1635. }
  1636. iNdEx += skippy
  1637. }
  1638. }
  1639. if iNdEx > l {
  1640. return io.ErrUnexpectedEOF
  1641. }
  1642. return nil
  1643. }
  1644. func (m *BlockParams) Unmarshal(dAtA []byte) error {
  1645. l := len(dAtA)
  1646. iNdEx := 0
  1647. for iNdEx < l {
  1648. preIndex := iNdEx
  1649. var wire uint64
  1650. for shift := uint(0); ; shift += 7 {
  1651. if shift >= 64 {
  1652. return ErrIntOverflowParams
  1653. }
  1654. if iNdEx >= l {
  1655. return io.ErrUnexpectedEOF
  1656. }
  1657. b := dAtA[iNdEx]
  1658. iNdEx++
  1659. wire |= uint64(b&0x7F) << shift
  1660. if b < 0x80 {
  1661. break
  1662. }
  1663. }
  1664. fieldNum := int32(wire >> 3)
  1665. wireType := int(wire & 0x7)
  1666. if wireType == 4 {
  1667. return fmt.Errorf("proto: BlockParams: wiretype end group for non-group")
  1668. }
  1669. if fieldNum <= 0 {
  1670. return fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire)
  1671. }
  1672. switch fieldNum {
  1673. case 1:
  1674. if wireType != 0 {
  1675. return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType)
  1676. }
  1677. m.MaxBytes = 0
  1678. for shift := uint(0); ; shift += 7 {
  1679. if shift >= 64 {
  1680. return ErrIntOverflowParams
  1681. }
  1682. if iNdEx >= l {
  1683. return io.ErrUnexpectedEOF
  1684. }
  1685. b := dAtA[iNdEx]
  1686. iNdEx++
  1687. m.MaxBytes |= int64(b&0x7F) << shift
  1688. if b < 0x80 {
  1689. break
  1690. }
  1691. }
  1692. case 2:
  1693. if wireType != 0 {
  1694. return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType)
  1695. }
  1696. m.MaxGas = 0
  1697. for shift := uint(0); ; shift += 7 {
  1698. if shift >= 64 {
  1699. return ErrIntOverflowParams
  1700. }
  1701. if iNdEx >= l {
  1702. return io.ErrUnexpectedEOF
  1703. }
  1704. b := dAtA[iNdEx]
  1705. iNdEx++
  1706. m.MaxGas |= int64(b&0x7F) << shift
  1707. if b < 0x80 {
  1708. break
  1709. }
  1710. }
  1711. default:
  1712. iNdEx = preIndex
  1713. skippy, err := skipParams(dAtA[iNdEx:])
  1714. if err != nil {
  1715. return err
  1716. }
  1717. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1718. return ErrInvalidLengthParams
  1719. }
  1720. if (iNdEx + skippy) > l {
  1721. return io.ErrUnexpectedEOF
  1722. }
  1723. iNdEx += skippy
  1724. }
  1725. }
  1726. if iNdEx > l {
  1727. return io.ErrUnexpectedEOF
  1728. }
  1729. return nil
  1730. }
  1731. func (m *EvidenceParams) Unmarshal(dAtA []byte) error {
  1732. l := len(dAtA)
  1733. iNdEx := 0
  1734. for iNdEx < l {
  1735. preIndex := iNdEx
  1736. var wire uint64
  1737. for shift := uint(0); ; shift += 7 {
  1738. if shift >= 64 {
  1739. return ErrIntOverflowParams
  1740. }
  1741. if iNdEx >= l {
  1742. return io.ErrUnexpectedEOF
  1743. }
  1744. b := dAtA[iNdEx]
  1745. iNdEx++
  1746. wire |= uint64(b&0x7F) << shift
  1747. if b < 0x80 {
  1748. break
  1749. }
  1750. }
  1751. fieldNum := int32(wire >> 3)
  1752. wireType := int(wire & 0x7)
  1753. if wireType == 4 {
  1754. return fmt.Errorf("proto: EvidenceParams: wiretype end group for non-group")
  1755. }
  1756. if fieldNum <= 0 {
  1757. return fmt.Errorf("proto: EvidenceParams: illegal tag %d (wire type %d)", fieldNum, wire)
  1758. }
  1759. switch fieldNum {
  1760. case 1:
  1761. if wireType != 0 {
  1762. return fmt.Errorf("proto: wrong wireType = %d for field MaxAgeNumBlocks", wireType)
  1763. }
  1764. m.MaxAgeNumBlocks = 0
  1765. for shift := uint(0); ; shift += 7 {
  1766. if shift >= 64 {
  1767. return ErrIntOverflowParams
  1768. }
  1769. if iNdEx >= l {
  1770. return io.ErrUnexpectedEOF
  1771. }
  1772. b := dAtA[iNdEx]
  1773. iNdEx++
  1774. m.MaxAgeNumBlocks |= int64(b&0x7F) << shift
  1775. if b < 0x80 {
  1776. break
  1777. }
  1778. }
  1779. case 2:
  1780. if wireType != 2 {
  1781. return fmt.Errorf("proto: wrong wireType = %d for field MaxAgeDuration", wireType)
  1782. }
  1783. var msglen int
  1784. for shift := uint(0); ; shift += 7 {
  1785. if shift >= 64 {
  1786. return ErrIntOverflowParams
  1787. }
  1788. if iNdEx >= l {
  1789. return io.ErrUnexpectedEOF
  1790. }
  1791. b := dAtA[iNdEx]
  1792. iNdEx++
  1793. msglen |= int(b&0x7F) << shift
  1794. if b < 0x80 {
  1795. break
  1796. }
  1797. }
  1798. if msglen < 0 {
  1799. return ErrInvalidLengthParams
  1800. }
  1801. postIndex := iNdEx + msglen
  1802. if postIndex < 0 {
  1803. return ErrInvalidLengthParams
  1804. }
  1805. if postIndex > l {
  1806. return io.ErrUnexpectedEOF
  1807. }
  1808. if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MaxAgeDuration, dAtA[iNdEx:postIndex]); err != nil {
  1809. return err
  1810. }
  1811. iNdEx = postIndex
  1812. case 3:
  1813. if wireType != 0 {
  1814. return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType)
  1815. }
  1816. m.MaxBytes = 0
  1817. for shift := uint(0); ; shift += 7 {
  1818. if shift >= 64 {
  1819. return ErrIntOverflowParams
  1820. }
  1821. if iNdEx >= l {
  1822. return io.ErrUnexpectedEOF
  1823. }
  1824. b := dAtA[iNdEx]
  1825. iNdEx++
  1826. m.MaxBytes |= int64(b&0x7F) << shift
  1827. if b < 0x80 {
  1828. break
  1829. }
  1830. }
  1831. default:
  1832. iNdEx = preIndex
  1833. skippy, err := skipParams(dAtA[iNdEx:])
  1834. if err != nil {
  1835. return err
  1836. }
  1837. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1838. return ErrInvalidLengthParams
  1839. }
  1840. if (iNdEx + skippy) > l {
  1841. return io.ErrUnexpectedEOF
  1842. }
  1843. iNdEx += skippy
  1844. }
  1845. }
  1846. if iNdEx > l {
  1847. return io.ErrUnexpectedEOF
  1848. }
  1849. return nil
  1850. }
  1851. func (m *ValidatorParams) Unmarshal(dAtA []byte) error {
  1852. l := len(dAtA)
  1853. iNdEx := 0
  1854. for iNdEx < l {
  1855. preIndex := iNdEx
  1856. var wire uint64
  1857. for shift := uint(0); ; shift += 7 {
  1858. if shift >= 64 {
  1859. return ErrIntOverflowParams
  1860. }
  1861. if iNdEx >= l {
  1862. return io.ErrUnexpectedEOF
  1863. }
  1864. b := dAtA[iNdEx]
  1865. iNdEx++
  1866. wire |= uint64(b&0x7F) << shift
  1867. if b < 0x80 {
  1868. break
  1869. }
  1870. }
  1871. fieldNum := int32(wire >> 3)
  1872. wireType := int(wire & 0x7)
  1873. if wireType == 4 {
  1874. return fmt.Errorf("proto: ValidatorParams: wiretype end group for non-group")
  1875. }
  1876. if fieldNum <= 0 {
  1877. return fmt.Errorf("proto: ValidatorParams: illegal tag %d (wire type %d)", fieldNum, wire)
  1878. }
  1879. switch fieldNum {
  1880. case 1:
  1881. if wireType != 2 {
  1882. return fmt.Errorf("proto: wrong wireType = %d for field PubKeyTypes", wireType)
  1883. }
  1884. var stringLen uint64
  1885. for shift := uint(0); ; shift += 7 {
  1886. if shift >= 64 {
  1887. return ErrIntOverflowParams
  1888. }
  1889. if iNdEx >= l {
  1890. return io.ErrUnexpectedEOF
  1891. }
  1892. b := dAtA[iNdEx]
  1893. iNdEx++
  1894. stringLen |= uint64(b&0x7F) << shift
  1895. if b < 0x80 {
  1896. break
  1897. }
  1898. }
  1899. intStringLen := int(stringLen)
  1900. if intStringLen < 0 {
  1901. return ErrInvalidLengthParams
  1902. }
  1903. postIndex := iNdEx + intStringLen
  1904. if postIndex < 0 {
  1905. return ErrInvalidLengthParams
  1906. }
  1907. if postIndex > l {
  1908. return io.ErrUnexpectedEOF
  1909. }
  1910. m.PubKeyTypes = append(m.PubKeyTypes, string(dAtA[iNdEx:postIndex]))
  1911. iNdEx = postIndex
  1912. default:
  1913. iNdEx = preIndex
  1914. skippy, err := skipParams(dAtA[iNdEx:])
  1915. if err != nil {
  1916. return err
  1917. }
  1918. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1919. return ErrInvalidLengthParams
  1920. }
  1921. if (iNdEx + skippy) > l {
  1922. return io.ErrUnexpectedEOF
  1923. }
  1924. iNdEx += skippy
  1925. }
  1926. }
  1927. if iNdEx > l {
  1928. return io.ErrUnexpectedEOF
  1929. }
  1930. return nil
  1931. }
  1932. func (m *VersionParams) Unmarshal(dAtA []byte) error {
  1933. l := len(dAtA)
  1934. iNdEx := 0
  1935. for iNdEx < l {
  1936. preIndex := iNdEx
  1937. var wire uint64
  1938. for shift := uint(0); ; shift += 7 {
  1939. if shift >= 64 {
  1940. return ErrIntOverflowParams
  1941. }
  1942. if iNdEx >= l {
  1943. return io.ErrUnexpectedEOF
  1944. }
  1945. b := dAtA[iNdEx]
  1946. iNdEx++
  1947. wire |= uint64(b&0x7F) << shift
  1948. if b < 0x80 {
  1949. break
  1950. }
  1951. }
  1952. fieldNum := int32(wire >> 3)
  1953. wireType := int(wire & 0x7)
  1954. if wireType == 4 {
  1955. return fmt.Errorf("proto: VersionParams: wiretype end group for non-group")
  1956. }
  1957. if fieldNum <= 0 {
  1958. return fmt.Errorf("proto: VersionParams: illegal tag %d (wire type %d)", fieldNum, wire)
  1959. }
  1960. switch fieldNum {
  1961. case 1:
  1962. if wireType != 0 {
  1963. return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType)
  1964. }
  1965. m.AppVersion = 0
  1966. for shift := uint(0); ; shift += 7 {
  1967. if shift >= 64 {
  1968. return ErrIntOverflowParams
  1969. }
  1970. if iNdEx >= l {
  1971. return io.ErrUnexpectedEOF
  1972. }
  1973. b := dAtA[iNdEx]
  1974. iNdEx++
  1975. m.AppVersion |= uint64(b&0x7F) << shift
  1976. if b < 0x80 {
  1977. break
  1978. }
  1979. }
  1980. default:
  1981. iNdEx = preIndex
  1982. skippy, err := skipParams(dAtA[iNdEx:])
  1983. if err != nil {
  1984. return err
  1985. }
  1986. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1987. return ErrInvalidLengthParams
  1988. }
  1989. if (iNdEx + skippy) > l {
  1990. return io.ErrUnexpectedEOF
  1991. }
  1992. iNdEx += skippy
  1993. }
  1994. }
  1995. if iNdEx > l {
  1996. return io.ErrUnexpectedEOF
  1997. }
  1998. return nil
  1999. }
  2000. func (m *HashedParams) Unmarshal(dAtA []byte) error {
  2001. l := len(dAtA)
  2002. iNdEx := 0
  2003. for iNdEx < l {
  2004. preIndex := iNdEx
  2005. var wire uint64
  2006. for shift := uint(0); ; shift += 7 {
  2007. if shift >= 64 {
  2008. return ErrIntOverflowParams
  2009. }
  2010. if iNdEx >= l {
  2011. return io.ErrUnexpectedEOF
  2012. }
  2013. b := dAtA[iNdEx]
  2014. iNdEx++
  2015. wire |= uint64(b&0x7F) << shift
  2016. if b < 0x80 {
  2017. break
  2018. }
  2019. }
  2020. fieldNum := int32(wire >> 3)
  2021. wireType := int(wire & 0x7)
  2022. if wireType == 4 {
  2023. return fmt.Errorf("proto: HashedParams: wiretype end group for non-group")
  2024. }
  2025. if fieldNum <= 0 {
  2026. return fmt.Errorf("proto: HashedParams: illegal tag %d (wire type %d)", fieldNum, wire)
  2027. }
  2028. switch fieldNum {
  2029. case 1:
  2030. if wireType != 0 {
  2031. return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxBytes", wireType)
  2032. }
  2033. m.BlockMaxBytes = 0
  2034. for shift := uint(0); ; shift += 7 {
  2035. if shift >= 64 {
  2036. return ErrIntOverflowParams
  2037. }
  2038. if iNdEx >= l {
  2039. return io.ErrUnexpectedEOF
  2040. }
  2041. b := dAtA[iNdEx]
  2042. iNdEx++
  2043. m.BlockMaxBytes |= int64(b&0x7F) << shift
  2044. if b < 0x80 {
  2045. break
  2046. }
  2047. }
  2048. case 2:
  2049. if wireType != 0 {
  2050. return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType)
  2051. }
  2052. m.BlockMaxGas = 0
  2053. for shift := uint(0); ; shift += 7 {
  2054. if shift >= 64 {
  2055. return ErrIntOverflowParams
  2056. }
  2057. if iNdEx >= l {
  2058. return io.ErrUnexpectedEOF
  2059. }
  2060. b := dAtA[iNdEx]
  2061. iNdEx++
  2062. m.BlockMaxGas |= int64(b&0x7F) << shift
  2063. if b < 0x80 {
  2064. break
  2065. }
  2066. }
  2067. default:
  2068. iNdEx = preIndex
  2069. skippy, err := skipParams(dAtA[iNdEx:])
  2070. if err != nil {
  2071. return err
  2072. }
  2073. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2074. return ErrInvalidLengthParams
  2075. }
  2076. if (iNdEx + skippy) > l {
  2077. return io.ErrUnexpectedEOF
  2078. }
  2079. iNdEx += skippy
  2080. }
  2081. }
  2082. if iNdEx > l {
  2083. return io.ErrUnexpectedEOF
  2084. }
  2085. return nil
  2086. }
  2087. func (m *SynchronyParams) Unmarshal(dAtA []byte) error {
  2088. l := len(dAtA)
  2089. iNdEx := 0
  2090. for iNdEx < l {
  2091. preIndex := iNdEx
  2092. var wire uint64
  2093. for shift := uint(0); ; shift += 7 {
  2094. if shift >= 64 {
  2095. return ErrIntOverflowParams
  2096. }
  2097. if iNdEx >= l {
  2098. return io.ErrUnexpectedEOF
  2099. }
  2100. b := dAtA[iNdEx]
  2101. iNdEx++
  2102. wire |= uint64(b&0x7F) << shift
  2103. if b < 0x80 {
  2104. break
  2105. }
  2106. }
  2107. fieldNum := int32(wire >> 3)
  2108. wireType := int(wire & 0x7)
  2109. if wireType == 4 {
  2110. return fmt.Errorf("proto: SynchronyParams: wiretype end group for non-group")
  2111. }
  2112. if fieldNum <= 0 {
  2113. return fmt.Errorf("proto: SynchronyParams: illegal tag %d (wire type %d)", fieldNum, wire)
  2114. }
  2115. switch fieldNum {
  2116. case 1:
  2117. if wireType != 2 {
  2118. return fmt.Errorf("proto: wrong wireType = %d for field MessageDelay", wireType)
  2119. }
  2120. var msglen int
  2121. for shift := uint(0); ; shift += 7 {
  2122. if shift >= 64 {
  2123. return ErrIntOverflowParams
  2124. }
  2125. if iNdEx >= l {
  2126. return io.ErrUnexpectedEOF
  2127. }
  2128. b := dAtA[iNdEx]
  2129. iNdEx++
  2130. msglen |= int(b&0x7F) << shift
  2131. if b < 0x80 {
  2132. break
  2133. }
  2134. }
  2135. if msglen < 0 {
  2136. return ErrInvalidLengthParams
  2137. }
  2138. postIndex := iNdEx + msglen
  2139. if postIndex < 0 {
  2140. return ErrInvalidLengthParams
  2141. }
  2142. if postIndex > l {
  2143. return io.ErrUnexpectedEOF
  2144. }
  2145. if m.MessageDelay == nil {
  2146. m.MessageDelay = new(time.Duration)
  2147. }
  2148. if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.MessageDelay, dAtA[iNdEx:postIndex]); err != nil {
  2149. return err
  2150. }
  2151. iNdEx = postIndex
  2152. case 2:
  2153. if wireType != 2 {
  2154. return fmt.Errorf("proto: wrong wireType = %d for field Precision", wireType)
  2155. }
  2156. var msglen int
  2157. for shift := uint(0); ; shift += 7 {
  2158. if shift >= 64 {
  2159. return ErrIntOverflowParams
  2160. }
  2161. if iNdEx >= l {
  2162. return io.ErrUnexpectedEOF
  2163. }
  2164. b := dAtA[iNdEx]
  2165. iNdEx++
  2166. msglen |= int(b&0x7F) << shift
  2167. if b < 0x80 {
  2168. break
  2169. }
  2170. }
  2171. if msglen < 0 {
  2172. return ErrInvalidLengthParams
  2173. }
  2174. postIndex := iNdEx + msglen
  2175. if postIndex < 0 {
  2176. return ErrInvalidLengthParams
  2177. }
  2178. if postIndex > l {
  2179. return io.ErrUnexpectedEOF
  2180. }
  2181. if m.Precision == nil {
  2182. m.Precision = new(time.Duration)
  2183. }
  2184. if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Precision, dAtA[iNdEx:postIndex]); err != nil {
  2185. return err
  2186. }
  2187. iNdEx = postIndex
  2188. default:
  2189. iNdEx = preIndex
  2190. skippy, err := skipParams(dAtA[iNdEx:])
  2191. if err != nil {
  2192. return err
  2193. }
  2194. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2195. return ErrInvalidLengthParams
  2196. }
  2197. if (iNdEx + skippy) > l {
  2198. return io.ErrUnexpectedEOF
  2199. }
  2200. iNdEx += skippy
  2201. }
  2202. }
  2203. if iNdEx > l {
  2204. return io.ErrUnexpectedEOF
  2205. }
  2206. return nil
  2207. }
  2208. func (m *TimeoutParams) Unmarshal(dAtA []byte) error {
  2209. l := len(dAtA)
  2210. iNdEx := 0
  2211. for iNdEx < l {
  2212. preIndex := iNdEx
  2213. var wire uint64
  2214. for shift := uint(0); ; shift += 7 {
  2215. if shift >= 64 {
  2216. return ErrIntOverflowParams
  2217. }
  2218. if iNdEx >= l {
  2219. return io.ErrUnexpectedEOF
  2220. }
  2221. b := dAtA[iNdEx]
  2222. iNdEx++
  2223. wire |= uint64(b&0x7F) << shift
  2224. if b < 0x80 {
  2225. break
  2226. }
  2227. }
  2228. fieldNum := int32(wire >> 3)
  2229. wireType := int(wire & 0x7)
  2230. if wireType == 4 {
  2231. return fmt.Errorf("proto: TimeoutParams: wiretype end group for non-group")
  2232. }
  2233. if fieldNum <= 0 {
  2234. return fmt.Errorf("proto: TimeoutParams: illegal tag %d (wire type %d)", fieldNum, wire)
  2235. }
  2236. switch fieldNum {
  2237. case 1:
  2238. if wireType != 2 {
  2239. return fmt.Errorf("proto: wrong wireType = %d for field Propose", wireType)
  2240. }
  2241. var msglen int
  2242. for shift := uint(0); ; shift += 7 {
  2243. if shift >= 64 {
  2244. return ErrIntOverflowParams
  2245. }
  2246. if iNdEx >= l {
  2247. return io.ErrUnexpectedEOF
  2248. }
  2249. b := dAtA[iNdEx]
  2250. iNdEx++
  2251. msglen |= int(b&0x7F) << shift
  2252. if b < 0x80 {
  2253. break
  2254. }
  2255. }
  2256. if msglen < 0 {
  2257. return ErrInvalidLengthParams
  2258. }
  2259. postIndex := iNdEx + msglen
  2260. if postIndex < 0 {
  2261. return ErrInvalidLengthParams
  2262. }
  2263. if postIndex > l {
  2264. return io.ErrUnexpectedEOF
  2265. }
  2266. if m.Propose == nil {
  2267. m.Propose = new(time.Duration)
  2268. }
  2269. if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Propose, dAtA[iNdEx:postIndex]); err != nil {
  2270. return err
  2271. }
  2272. iNdEx = postIndex
  2273. case 2:
  2274. if wireType != 2 {
  2275. return fmt.Errorf("proto: wrong wireType = %d for field ProposeDelta", wireType)
  2276. }
  2277. var msglen int
  2278. for shift := uint(0); ; shift += 7 {
  2279. if shift >= 64 {
  2280. return ErrIntOverflowParams
  2281. }
  2282. if iNdEx >= l {
  2283. return io.ErrUnexpectedEOF
  2284. }
  2285. b := dAtA[iNdEx]
  2286. iNdEx++
  2287. msglen |= int(b&0x7F) << shift
  2288. if b < 0x80 {
  2289. break
  2290. }
  2291. }
  2292. if msglen < 0 {
  2293. return ErrInvalidLengthParams
  2294. }
  2295. postIndex := iNdEx + msglen
  2296. if postIndex < 0 {
  2297. return ErrInvalidLengthParams
  2298. }
  2299. if postIndex > l {
  2300. return io.ErrUnexpectedEOF
  2301. }
  2302. if m.ProposeDelta == nil {
  2303. m.ProposeDelta = new(time.Duration)
  2304. }
  2305. if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.ProposeDelta, dAtA[iNdEx:postIndex]); err != nil {
  2306. return err
  2307. }
  2308. iNdEx = postIndex
  2309. case 3:
  2310. if wireType != 2 {
  2311. return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType)
  2312. }
  2313. var msglen int
  2314. for shift := uint(0); ; shift += 7 {
  2315. if shift >= 64 {
  2316. return ErrIntOverflowParams
  2317. }
  2318. if iNdEx >= l {
  2319. return io.ErrUnexpectedEOF
  2320. }
  2321. b := dAtA[iNdEx]
  2322. iNdEx++
  2323. msglen |= int(b&0x7F) << shift
  2324. if b < 0x80 {
  2325. break
  2326. }
  2327. }
  2328. if msglen < 0 {
  2329. return ErrInvalidLengthParams
  2330. }
  2331. postIndex := iNdEx + msglen
  2332. if postIndex < 0 {
  2333. return ErrInvalidLengthParams
  2334. }
  2335. if postIndex > l {
  2336. return io.ErrUnexpectedEOF
  2337. }
  2338. if m.Vote == nil {
  2339. m.Vote = new(time.Duration)
  2340. }
  2341. if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Vote, dAtA[iNdEx:postIndex]); err != nil {
  2342. return err
  2343. }
  2344. iNdEx = postIndex
  2345. case 4:
  2346. if wireType != 2 {
  2347. return fmt.Errorf("proto: wrong wireType = %d for field VoteDelta", wireType)
  2348. }
  2349. var msglen int
  2350. for shift := uint(0); ; shift += 7 {
  2351. if shift >= 64 {
  2352. return ErrIntOverflowParams
  2353. }
  2354. if iNdEx >= l {
  2355. return io.ErrUnexpectedEOF
  2356. }
  2357. b := dAtA[iNdEx]
  2358. iNdEx++
  2359. msglen |= int(b&0x7F) << shift
  2360. if b < 0x80 {
  2361. break
  2362. }
  2363. }
  2364. if msglen < 0 {
  2365. return ErrInvalidLengthParams
  2366. }
  2367. postIndex := iNdEx + msglen
  2368. if postIndex < 0 {
  2369. return ErrInvalidLengthParams
  2370. }
  2371. if postIndex > l {
  2372. return io.ErrUnexpectedEOF
  2373. }
  2374. if m.VoteDelta == nil {
  2375. m.VoteDelta = new(time.Duration)
  2376. }
  2377. if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.VoteDelta, dAtA[iNdEx:postIndex]); err != nil {
  2378. return err
  2379. }
  2380. iNdEx = postIndex
  2381. case 5:
  2382. if wireType != 2 {
  2383. return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType)
  2384. }
  2385. var msglen int
  2386. for shift := uint(0); ; shift += 7 {
  2387. if shift >= 64 {
  2388. return ErrIntOverflowParams
  2389. }
  2390. if iNdEx >= l {
  2391. return io.ErrUnexpectedEOF
  2392. }
  2393. b := dAtA[iNdEx]
  2394. iNdEx++
  2395. msglen |= int(b&0x7F) << shift
  2396. if b < 0x80 {
  2397. break
  2398. }
  2399. }
  2400. if msglen < 0 {
  2401. return ErrInvalidLengthParams
  2402. }
  2403. postIndex := iNdEx + msglen
  2404. if postIndex < 0 {
  2405. return ErrInvalidLengthParams
  2406. }
  2407. if postIndex > l {
  2408. return io.ErrUnexpectedEOF
  2409. }
  2410. if m.Commit == nil {
  2411. m.Commit = new(time.Duration)
  2412. }
  2413. if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Commit, dAtA[iNdEx:postIndex]); err != nil {
  2414. return err
  2415. }
  2416. iNdEx = postIndex
  2417. case 6:
  2418. if wireType != 0 {
  2419. return fmt.Errorf("proto: wrong wireType = %d for field BypassCommitTimeout", wireType)
  2420. }
  2421. var v int
  2422. for shift := uint(0); ; shift += 7 {
  2423. if shift >= 64 {
  2424. return ErrIntOverflowParams
  2425. }
  2426. if iNdEx >= l {
  2427. return io.ErrUnexpectedEOF
  2428. }
  2429. b := dAtA[iNdEx]
  2430. iNdEx++
  2431. v |= int(b&0x7F) << shift
  2432. if b < 0x80 {
  2433. break
  2434. }
  2435. }
  2436. m.BypassCommitTimeout = bool(v != 0)
  2437. default:
  2438. iNdEx = preIndex
  2439. skippy, err := skipParams(dAtA[iNdEx:])
  2440. if err != nil {
  2441. return err
  2442. }
  2443. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2444. return ErrInvalidLengthParams
  2445. }
  2446. if (iNdEx + skippy) > l {
  2447. return io.ErrUnexpectedEOF
  2448. }
  2449. iNdEx += skippy
  2450. }
  2451. }
  2452. if iNdEx > l {
  2453. return io.ErrUnexpectedEOF
  2454. }
  2455. return nil
  2456. }
  2457. func skipParams(dAtA []byte) (n int, err error) {
  2458. l := len(dAtA)
  2459. iNdEx := 0
  2460. depth := 0
  2461. for iNdEx < l {
  2462. var wire uint64
  2463. for shift := uint(0); ; shift += 7 {
  2464. if shift >= 64 {
  2465. return 0, ErrIntOverflowParams
  2466. }
  2467. if iNdEx >= l {
  2468. return 0, io.ErrUnexpectedEOF
  2469. }
  2470. b := dAtA[iNdEx]
  2471. iNdEx++
  2472. wire |= (uint64(b) & 0x7F) << shift
  2473. if b < 0x80 {
  2474. break
  2475. }
  2476. }
  2477. wireType := int(wire & 0x7)
  2478. switch wireType {
  2479. case 0:
  2480. for shift := uint(0); ; shift += 7 {
  2481. if shift >= 64 {
  2482. return 0, ErrIntOverflowParams
  2483. }
  2484. if iNdEx >= l {
  2485. return 0, io.ErrUnexpectedEOF
  2486. }
  2487. iNdEx++
  2488. if dAtA[iNdEx-1] < 0x80 {
  2489. break
  2490. }
  2491. }
  2492. case 1:
  2493. iNdEx += 8
  2494. case 2:
  2495. var length int
  2496. for shift := uint(0); ; shift += 7 {
  2497. if shift >= 64 {
  2498. return 0, ErrIntOverflowParams
  2499. }
  2500. if iNdEx >= l {
  2501. return 0, io.ErrUnexpectedEOF
  2502. }
  2503. b := dAtA[iNdEx]
  2504. iNdEx++
  2505. length |= (int(b) & 0x7F) << shift
  2506. if b < 0x80 {
  2507. break
  2508. }
  2509. }
  2510. if length < 0 {
  2511. return 0, ErrInvalidLengthParams
  2512. }
  2513. iNdEx += length
  2514. case 3:
  2515. depth++
  2516. case 4:
  2517. if depth == 0 {
  2518. return 0, ErrUnexpectedEndOfGroupParams
  2519. }
  2520. depth--
  2521. case 5:
  2522. iNdEx += 4
  2523. default:
  2524. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2525. }
  2526. if iNdEx < 0 {
  2527. return 0, ErrInvalidLengthParams
  2528. }
  2529. if depth == 0 {
  2530. return iNdEx, nil
  2531. }
  2532. }
  2533. return 0, io.ErrUnexpectedEOF
  2534. }
  2535. var (
  2536. ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling")
  2537. ErrIntOverflowParams = fmt.Errorf("proto: integer overflow")
  2538. ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
  2539. )