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.

3428 lines
79 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: tendermint/consensus/types.proto
  3. package consensus
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. bits "github.com/tendermint/tendermint/proto/tendermint/libs/bits"
  9. types "github.com/tendermint/tendermint/proto/tendermint/types"
  10. io "io"
  11. math "math"
  12. math_bits "math/bits"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  23. // NewRoundStep is sent for every step taken in the ConsensusState.
  24. // For every height/round/step transition
  25. type NewRoundStep struct {
  26. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  27. Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
  28. Step uint32 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"`
  29. SecondsSinceStartTime int64 `protobuf:"varint,4,opt,name=seconds_since_start_time,json=secondsSinceStartTime,proto3" json:"seconds_since_start_time,omitempty"`
  30. LastCommitRound int32 `protobuf:"varint,5,opt,name=last_commit_round,json=lastCommitRound,proto3" json:"last_commit_round,omitempty"`
  31. }
  32. func (m *NewRoundStep) Reset() { *m = NewRoundStep{} }
  33. func (m *NewRoundStep) String() string { return proto.CompactTextString(m) }
  34. func (*NewRoundStep) ProtoMessage() {}
  35. func (*NewRoundStep) Descriptor() ([]byte, []int) {
  36. return fileDescriptor_81a22d2efc008981, []int{0}
  37. }
  38. func (m *NewRoundStep) XXX_Unmarshal(b []byte) error {
  39. return m.Unmarshal(b)
  40. }
  41. func (m *NewRoundStep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  42. if deterministic {
  43. return xxx_messageInfo_NewRoundStep.Marshal(b, m, deterministic)
  44. } else {
  45. b = b[:cap(b)]
  46. n, err := m.MarshalToSizedBuffer(b)
  47. if err != nil {
  48. return nil, err
  49. }
  50. return b[:n], nil
  51. }
  52. }
  53. func (m *NewRoundStep) XXX_Merge(src proto.Message) {
  54. xxx_messageInfo_NewRoundStep.Merge(m, src)
  55. }
  56. func (m *NewRoundStep) XXX_Size() int {
  57. return m.Size()
  58. }
  59. func (m *NewRoundStep) XXX_DiscardUnknown() {
  60. xxx_messageInfo_NewRoundStep.DiscardUnknown(m)
  61. }
  62. var xxx_messageInfo_NewRoundStep proto.InternalMessageInfo
  63. func (m *NewRoundStep) GetHeight() int64 {
  64. if m != nil {
  65. return m.Height
  66. }
  67. return 0
  68. }
  69. func (m *NewRoundStep) GetRound() int32 {
  70. if m != nil {
  71. return m.Round
  72. }
  73. return 0
  74. }
  75. func (m *NewRoundStep) GetStep() uint32 {
  76. if m != nil {
  77. return m.Step
  78. }
  79. return 0
  80. }
  81. func (m *NewRoundStep) GetSecondsSinceStartTime() int64 {
  82. if m != nil {
  83. return m.SecondsSinceStartTime
  84. }
  85. return 0
  86. }
  87. func (m *NewRoundStep) GetLastCommitRound() int32 {
  88. if m != nil {
  89. return m.LastCommitRound
  90. }
  91. return 0
  92. }
  93. // NewValidBlock is sent when a validator observes a valid block B in some round
  94. // r,
  95. // i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in
  96. // the round r.
  97. // In case the block is also committed, then IsCommit flag is set to true.
  98. type NewValidBlock struct {
  99. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  100. Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
  101. BlockPartSetHeader types.PartSetHeader `protobuf:"bytes,3,opt,name=block_part_set_header,json=blockPartSetHeader,proto3" json:"block_part_set_header"`
  102. BlockParts *bits.BitArray `protobuf:"bytes,4,opt,name=block_parts,json=blockParts,proto3" json:"block_parts,omitempty"`
  103. IsCommit bool `protobuf:"varint,5,opt,name=is_commit,json=isCommit,proto3" json:"is_commit,omitempty"`
  104. }
  105. func (m *NewValidBlock) Reset() { *m = NewValidBlock{} }
  106. func (m *NewValidBlock) String() string { return proto.CompactTextString(m) }
  107. func (*NewValidBlock) ProtoMessage() {}
  108. func (*NewValidBlock) Descriptor() ([]byte, []int) {
  109. return fileDescriptor_81a22d2efc008981, []int{1}
  110. }
  111. func (m *NewValidBlock) XXX_Unmarshal(b []byte) error {
  112. return m.Unmarshal(b)
  113. }
  114. func (m *NewValidBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  115. if deterministic {
  116. return xxx_messageInfo_NewValidBlock.Marshal(b, m, deterministic)
  117. } else {
  118. b = b[:cap(b)]
  119. n, err := m.MarshalToSizedBuffer(b)
  120. if err != nil {
  121. return nil, err
  122. }
  123. return b[:n], nil
  124. }
  125. }
  126. func (m *NewValidBlock) XXX_Merge(src proto.Message) {
  127. xxx_messageInfo_NewValidBlock.Merge(m, src)
  128. }
  129. func (m *NewValidBlock) XXX_Size() int {
  130. return m.Size()
  131. }
  132. func (m *NewValidBlock) XXX_DiscardUnknown() {
  133. xxx_messageInfo_NewValidBlock.DiscardUnknown(m)
  134. }
  135. var xxx_messageInfo_NewValidBlock proto.InternalMessageInfo
  136. func (m *NewValidBlock) GetHeight() int64 {
  137. if m != nil {
  138. return m.Height
  139. }
  140. return 0
  141. }
  142. func (m *NewValidBlock) GetRound() int32 {
  143. if m != nil {
  144. return m.Round
  145. }
  146. return 0
  147. }
  148. func (m *NewValidBlock) GetBlockPartSetHeader() types.PartSetHeader {
  149. if m != nil {
  150. return m.BlockPartSetHeader
  151. }
  152. return types.PartSetHeader{}
  153. }
  154. func (m *NewValidBlock) GetBlockParts() *bits.BitArray {
  155. if m != nil {
  156. return m.BlockParts
  157. }
  158. return nil
  159. }
  160. func (m *NewValidBlock) GetIsCommit() bool {
  161. if m != nil {
  162. return m.IsCommit
  163. }
  164. return false
  165. }
  166. // Proposal is sent when a new block is proposed.
  167. type Proposal struct {
  168. Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"`
  169. }
  170. func (m *Proposal) Reset() { *m = Proposal{} }
  171. func (m *Proposal) String() string { return proto.CompactTextString(m) }
  172. func (*Proposal) ProtoMessage() {}
  173. func (*Proposal) Descriptor() ([]byte, []int) {
  174. return fileDescriptor_81a22d2efc008981, []int{2}
  175. }
  176. func (m *Proposal) XXX_Unmarshal(b []byte) error {
  177. return m.Unmarshal(b)
  178. }
  179. func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  180. if deterministic {
  181. return xxx_messageInfo_Proposal.Marshal(b, m, deterministic)
  182. } else {
  183. b = b[:cap(b)]
  184. n, err := m.MarshalToSizedBuffer(b)
  185. if err != nil {
  186. return nil, err
  187. }
  188. return b[:n], nil
  189. }
  190. }
  191. func (m *Proposal) XXX_Merge(src proto.Message) {
  192. xxx_messageInfo_Proposal.Merge(m, src)
  193. }
  194. func (m *Proposal) XXX_Size() int {
  195. return m.Size()
  196. }
  197. func (m *Proposal) XXX_DiscardUnknown() {
  198. xxx_messageInfo_Proposal.DiscardUnknown(m)
  199. }
  200. var xxx_messageInfo_Proposal proto.InternalMessageInfo
  201. func (m *Proposal) GetProposal() types.Proposal {
  202. if m != nil {
  203. return m.Proposal
  204. }
  205. return types.Proposal{}
  206. }
  207. // ProposalPOL is sent when a previous proposal is re-proposed.
  208. type ProposalPOL struct {
  209. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  210. ProposalPolRound int32 `protobuf:"varint,2,opt,name=proposal_pol_round,json=proposalPolRound,proto3" json:"proposal_pol_round,omitempty"`
  211. ProposalPol bits.BitArray `protobuf:"bytes,3,opt,name=proposal_pol,json=proposalPol,proto3" json:"proposal_pol"`
  212. }
  213. func (m *ProposalPOL) Reset() { *m = ProposalPOL{} }
  214. func (m *ProposalPOL) String() string { return proto.CompactTextString(m) }
  215. func (*ProposalPOL) ProtoMessage() {}
  216. func (*ProposalPOL) Descriptor() ([]byte, []int) {
  217. return fileDescriptor_81a22d2efc008981, []int{3}
  218. }
  219. func (m *ProposalPOL) XXX_Unmarshal(b []byte) error {
  220. return m.Unmarshal(b)
  221. }
  222. func (m *ProposalPOL) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  223. if deterministic {
  224. return xxx_messageInfo_ProposalPOL.Marshal(b, m, deterministic)
  225. } else {
  226. b = b[:cap(b)]
  227. n, err := m.MarshalToSizedBuffer(b)
  228. if err != nil {
  229. return nil, err
  230. }
  231. return b[:n], nil
  232. }
  233. }
  234. func (m *ProposalPOL) XXX_Merge(src proto.Message) {
  235. xxx_messageInfo_ProposalPOL.Merge(m, src)
  236. }
  237. func (m *ProposalPOL) XXX_Size() int {
  238. return m.Size()
  239. }
  240. func (m *ProposalPOL) XXX_DiscardUnknown() {
  241. xxx_messageInfo_ProposalPOL.DiscardUnknown(m)
  242. }
  243. var xxx_messageInfo_ProposalPOL proto.InternalMessageInfo
  244. func (m *ProposalPOL) GetHeight() int64 {
  245. if m != nil {
  246. return m.Height
  247. }
  248. return 0
  249. }
  250. func (m *ProposalPOL) GetProposalPolRound() int32 {
  251. if m != nil {
  252. return m.ProposalPolRound
  253. }
  254. return 0
  255. }
  256. func (m *ProposalPOL) GetProposalPol() bits.BitArray {
  257. if m != nil {
  258. return m.ProposalPol
  259. }
  260. return bits.BitArray{}
  261. }
  262. // BlockPart is sent when gossipping a piece of the proposed block.
  263. type BlockPart struct {
  264. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  265. Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
  266. Part types.Part `protobuf:"bytes,3,opt,name=part,proto3" json:"part"`
  267. }
  268. func (m *BlockPart) Reset() { *m = BlockPart{} }
  269. func (m *BlockPart) String() string { return proto.CompactTextString(m) }
  270. func (*BlockPart) ProtoMessage() {}
  271. func (*BlockPart) Descriptor() ([]byte, []int) {
  272. return fileDescriptor_81a22d2efc008981, []int{4}
  273. }
  274. func (m *BlockPart) XXX_Unmarshal(b []byte) error {
  275. return m.Unmarshal(b)
  276. }
  277. func (m *BlockPart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  278. if deterministic {
  279. return xxx_messageInfo_BlockPart.Marshal(b, m, deterministic)
  280. } else {
  281. b = b[:cap(b)]
  282. n, err := m.MarshalToSizedBuffer(b)
  283. if err != nil {
  284. return nil, err
  285. }
  286. return b[:n], nil
  287. }
  288. }
  289. func (m *BlockPart) XXX_Merge(src proto.Message) {
  290. xxx_messageInfo_BlockPart.Merge(m, src)
  291. }
  292. func (m *BlockPart) XXX_Size() int {
  293. return m.Size()
  294. }
  295. func (m *BlockPart) XXX_DiscardUnknown() {
  296. xxx_messageInfo_BlockPart.DiscardUnknown(m)
  297. }
  298. var xxx_messageInfo_BlockPart proto.InternalMessageInfo
  299. func (m *BlockPart) GetHeight() int64 {
  300. if m != nil {
  301. return m.Height
  302. }
  303. return 0
  304. }
  305. func (m *BlockPart) GetRound() int32 {
  306. if m != nil {
  307. return m.Round
  308. }
  309. return 0
  310. }
  311. func (m *BlockPart) GetPart() types.Part {
  312. if m != nil {
  313. return m.Part
  314. }
  315. return types.Part{}
  316. }
  317. // Vote is sent when voting for a proposal (or lack thereof).
  318. type Vote struct {
  319. Vote *types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"`
  320. }
  321. func (m *Vote) Reset() { *m = Vote{} }
  322. func (m *Vote) String() string { return proto.CompactTextString(m) }
  323. func (*Vote) ProtoMessage() {}
  324. func (*Vote) Descriptor() ([]byte, []int) {
  325. return fileDescriptor_81a22d2efc008981, []int{5}
  326. }
  327. func (m *Vote) XXX_Unmarshal(b []byte) error {
  328. return m.Unmarshal(b)
  329. }
  330. func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  331. if deterministic {
  332. return xxx_messageInfo_Vote.Marshal(b, m, deterministic)
  333. } else {
  334. b = b[:cap(b)]
  335. n, err := m.MarshalToSizedBuffer(b)
  336. if err != nil {
  337. return nil, err
  338. }
  339. return b[:n], nil
  340. }
  341. }
  342. func (m *Vote) XXX_Merge(src proto.Message) {
  343. xxx_messageInfo_Vote.Merge(m, src)
  344. }
  345. func (m *Vote) XXX_Size() int {
  346. return m.Size()
  347. }
  348. func (m *Vote) XXX_DiscardUnknown() {
  349. xxx_messageInfo_Vote.DiscardUnknown(m)
  350. }
  351. var xxx_messageInfo_Vote proto.InternalMessageInfo
  352. func (m *Vote) GetVote() *types.Vote {
  353. if m != nil {
  354. return m.Vote
  355. }
  356. return nil
  357. }
  358. // HasVote is sent to indicate that a particular vote has been received.
  359. type HasVote struct {
  360. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  361. Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
  362. Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"`
  363. Index int32 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
  364. }
  365. func (m *HasVote) Reset() { *m = HasVote{} }
  366. func (m *HasVote) String() string { return proto.CompactTextString(m) }
  367. func (*HasVote) ProtoMessage() {}
  368. func (*HasVote) Descriptor() ([]byte, []int) {
  369. return fileDescriptor_81a22d2efc008981, []int{6}
  370. }
  371. func (m *HasVote) XXX_Unmarshal(b []byte) error {
  372. return m.Unmarshal(b)
  373. }
  374. func (m *HasVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  375. if deterministic {
  376. return xxx_messageInfo_HasVote.Marshal(b, m, deterministic)
  377. } else {
  378. b = b[:cap(b)]
  379. n, err := m.MarshalToSizedBuffer(b)
  380. if err != nil {
  381. return nil, err
  382. }
  383. return b[:n], nil
  384. }
  385. }
  386. func (m *HasVote) XXX_Merge(src proto.Message) {
  387. xxx_messageInfo_HasVote.Merge(m, src)
  388. }
  389. func (m *HasVote) XXX_Size() int {
  390. return m.Size()
  391. }
  392. func (m *HasVote) XXX_DiscardUnknown() {
  393. xxx_messageInfo_HasVote.DiscardUnknown(m)
  394. }
  395. var xxx_messageInfo_HasVote proto.InternalMessageInfo
  396. func (m *HasVote) GetHeight() int64 {
  397. if m != nil {
  398. return m.Height
  399. }
  400. return 0
  401. }
  402. func (m *HasVote) GetRound() int32 {
  403. if m != nil {
  404. return m.Round
  405. }
  406. return 0
  407. }
  408. func (m *HasVote) GetType() types.SignedMsgType {
  409. if m != nil {
  410. return m.Type
  411. }
  412. return types.UnknownType
  413. }
  414. func (m *HasVote) GetIndex() int32 {
  415. if m != nil {
  416. return m.Index
  417. }
  418. return 0
  419. }
  420. // VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes.
  421. type VoteSetMaj23 struct {
  422. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  423. Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
  424. Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"`
  425. BlockID types.BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"`
  426. }
  427. func (m *VoteSetMaj23) Reset() { *m = VoteSetMaj23{} }
  428. func (m *VoteSetMaj23) String() string { return proto.CompactTextString(m) }
  429. func (*VoteSetMaj23) ProtoMessage() {}
  430. func (*VoteSetMaj23) Descriptor() ([]byte, []int) {
  431. return fileDescriptor_81a22d2efc008981, []int{7}
  432. }
  433. func (m *VoteSetMaj23) XXX_Unmarshal(b []byte) error {
  434. return m.Unmarshal(b)
  435. }
  436. func (m *VoteSetMaj23) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  437. if deterministic {
  438. return xxx_messageInfo_VoteSetMaj23.Marshal(b, m, deterministic)
  439. } else {
  440. b = b[:cap(b)]
  441. n, err := m.MarshalToSizedBuffer(b)
  442. if err != nil {
  443. return nil, err
  444. }
  445. return b[:n], nil
  446. }
  447. }
  448. func (m *VoteSetMaj23) XXX_Merge(src proto.Message) {
  449. xxx_messageInfo_VoteSetMaj23.Merge(m, src)
  450. }
  451. func (m *VoteSetMaj23) XXX_Size() int {
  452. return m.Size()
  453. }
  454. func (m *VoteSetMaj23) XXX_DiscardUnknown() {
  455. xxx_messageInfo_VoteSetMaj23.DiscardUnknown(m)
  456. }
  457. var xxx_messageInfo_VoteSetMaj23 proto.InternalMessageInfo
  458. func (m *VoteSetMaj23) GetHeight() int64 {
  459. if m != nil {
  460. return m.Height
  461. }
  462. return 0
  463. }
  464. func (m *VoteSetMaj23) GetRound() int32 {
  465. if m != nil {
  466. return m.Round
  467. }
  468. return 0
  469. }
  470. func (m *VoteSetMaj23) GetType() types.SignedMsgType {
  471. if m != nil {
  472. return m.Type
  473. }
  474. return types.UnknownType
  475. }
  476. func (m *VoteSetMaj23) GetBlockID() types.BlockID {
  477. if m != nil {
  478. return m.BlockID
  479. }
  480. return types.BlockID{}
  481. }
  482. // VoteSetBits is sent to communicate the bit-array of votes seen for the
  483. // BlockID.
  484. type VoteSetBits struct {
  485. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  486. Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
  487. Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"`
  488. BlockID types.BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"`
  489. Votes bits.BitArray `protobuf:"bytes,5,opt,name=votes,proto3" json:"votes"`
  490. }
  491. func (m *VoteSetBits) Reset() { *m = VoteSetBits{} }
  492. func (m *VoteSetBits) String() string { return proto.CompactTextString(m) }
  493. func (*VoteSetBits) ProtoMessage() {}
  494. func (*VoteSetBits) Descriptor() ([]byte, []int) {
  495. return fileDescriptor_81a22d2efc008981, []int{8}
  496. }
  497. func (m *VoteSetBits) XXX_Unmarshal(b []byte) error {
  498. return m.Unmarshal(b)
  499. }
  500. func (m *VoteSetBits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  501. if deterministic {
  502. return xxx_messageInfo_VoteSetBits.Marshal(b, m, deterministic)
  503. } else {
  504. b = b[:cap(b)]
  505. n, err := m.MarshalToSizedBuffer(b)
  506. if err != nil {
  507. return nil, err
  508. }
  509. return b[:n], nil
  510. }
  511. }
  512. func (m *VoteSetBits) XXX_Merge(src proto.Message) {
  513. xxx_messageInfo_VoteSetBits.Merge(m, src)
  514. }
  515. func (m *VoteSetBits) XXX_Size() int {
  516. return m.Size()
  517. }
  518. func (m *VoteSetBits) XXX_DiscardUnknown() {
  519. xxx_messageInfo_VoteSetBits.DiscardUnknown(m)
  520. }
  521. var xxx_messageInfo_VoteSetBits proto.InternalMessageInfo
  522. func (m *VoteSetBits) GetHeight() int64 {
  523. if m != nil {
  524. return m.Height
  525. }
  526. return 0
  527. }
  528. func (m *VoteSetBits) GetRound() int32 {
  529. if m != nil {
  530. return m.Round
  531. }
  532. return 0
  533. }
  534. func (m *VoteSetBits) GetType() types.SignedMsgType {
  535. if m != nil {
  536. return m.Type
  537. }
  538. return types.UnknownType
  539. }
  540. func (m *VoteSetBits) GetBlockID() types.BlockID {
  541. if m != nil {
  542. return m.BlockID
  543. }
  544. return types.BlockID{}
  545. }
  546. func (m *VoteSetBits) GetVotes() bits.BitArray {
  547. if m != nil {
  548. return m.Votes
  549. }
  550. return bits.BitArray{}
  551. }
  552. type Message struct {
  553. // Types that are valid to be assigned to Sum:
  554. // *Message_NewRoundStep
  555. // *Message_NewValidBlock
  556. // *Message_Proposal
  557. // *Message_ProposalPol
  558. // *Message_BlockPart
  559. // *Message_Vote
  560. // *Message_HasVote
  561. // *Message_VoteSetMaj23
  562. // *Message_VoteSetBits
  563. Sum isMessage_Sum `protobuf_oneof:"sum"`
  564. }
  565. func (m *Message) Reset() { *m = Message{} }
  566. func (m *Message) String() string { return proto.CompactTextString(m) }
  567. func (*Message) ProtoMessage() {}
  568. func (*Message) Descriptor() ([]byte, []int) {
  569. return fileDescriptor_81a22d2efc008981, []int{9}
  570. }
  571. func (m *Message) XXX_Unmarshal(b []byte) error {
  572. return m.Unmarshal(b)
  573. }
  574. func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  575. if deterministic {
  576. return xxx_messageInfo_Message.Marshal(b, m, deterministic)
  577. } else {
  578. b = b[:cap(b)]
  579. n, err := m.MarshalToSizedBuffer(b)
  580. if err != nil {
  581. return nil, err
  582. }
  583. return b[:n], nil
  584. }
  585. }
  586. func (m *Message) XXX_Merge(src proto.Message) {
  587. xxx_messageInfo_Message.Merge(m, src)
  588. }
  589. func (m *Message) XXX_Size() int {
  590. return m.Size()
  591. }
  592. func (m *Message) XXX_DiscardUnknown() {
  593. xxx_messageInfo_Message.DiscardUnknown(m)
  594. }
  595. var xxx_messageInfo_Message proto.InternalMessageInfo
  596. type isMessage_Sum interface {
  597. isMessage_Sum()
  598. MarshalTo([]byte) (int, error)
  599. Size() int
  600. }
  601. type Message_NewRoundStep struct {
  602. NewRoundStep *NewRoundStep `protobuf:"bytes,1,opt,name=new_round_step,json=newRoundStep,proto3,oneof" json:"new_round_step,omitempty"`
  603. }
  604. type Message_NewValidBlock struct {
  605. NewValidBlock *NewValidBlock `protobuf:"bytes,2,opt,name=new_valid_block,json=newValidBlock,proto3,oneof" json:"new_valid_block,omitempty"`
  606. }
  607. type Message_Proposal struct {
  608. Proposal *Proposal `protobuf:"bytes,3,opt,name=proposal,proto3,oneof" json:"proposal,omitempty"`
  609. }
  610. type Message_ProposalPol struct {
  611. ProposalPol *ProposalPOL `protobuf:"bytes,4,opt,name=proposal_pol,json=proposalPol,proto3,oneof" json:"proposal_pol,omitempty"`
  612. }
  613. type Message_BlockPart struct {
  614. BlockPart *BlockPart `protobuf:"bytes,5,opt,name=block_part,json=blockPart,proto3,oneof" json:"block_part,omitempty"`
  615. }
  616. type Message_Vote struct {
  617. Vote *Vote `protobuf:"bytes,6,opt,name=vote,proto3,oneof" json:"vote,omitempty"`
  618. }
  619. type Message_HasVote struct {
  620. HasVote *HasVote `protobuf:"bytes,7,opt,name=has_vote,json=hasVote,proto3,oneof" json:"has_vote,omitempty"`
  621. }
  622. type Message_VoteSetMaj23 struct {
  623. VoteSetMaj23 *VoteSetMaj23 `protobuf:"bytes,8,opt,name=vote_set_maj23,json=voteSetMaj23,proto3,oneof" json:"vote_set_maj23,omitempty"`
  624. }
  625. type Message_VoteSetBits struct {
  626. VoteSetBits *VoteSetBits `protobuf:"bytes,9,opt,name=vote_set_bits,json=voteSetBits,proto3,oneof" json:"vote_set_bits,omitempty"`
  627. }
  628. func (*Message_NewRoundStep) isMessage_Sum() {}
  629. func (*Message_NewValidBlock) isMessage_Sum() {}
  630. func (*Message_Proposal) isMessage_Sum() {}
  631. func (*Message_ProposalPol) isMessage_Sum() {}
  632. func (*Message_BlockPart) isMessage_Sum() {}
  633. func (*Message_Vote) isMessage_Sum() {}
  634. func (*Message_HasVote) isMessage_Sum() {}
  635. func (*Message_VoteSetMaj23) isMessage_Sum() {}
  636. func (*Message_VoteSetBits) isMessage_Sum() {}
  637. func (m *Message) GetSum() isMessage_Sum {
  638. if m != nil {
  639. return m.Sum
  640. }
  641. return nil
  642. }
  643. func (m *Message) GetNewRoundStep() *NewRoundStep {
  644. if x, ok := m.GetSum().(*Message_NewRoundStep); ok {
  645. return x.NewRoundStep
  646. }
  647. return nil
  648. }
  649. func (m *Message) GetNewValidBlock() *NewValidBlock {
  650. if x, ok := m.GetSum().(*Message_NewValidBlock); ok {
  651. return x.NewValidBlock
  652. }
  653. return nil
  654. }
  655. func (m *Message) GetProposal() *Proposal {
  656. if x, ok := m.GetSum().(*Message_Proposal); ok {
  657. return x.Proposal
  658. }
  659. return nil
  660. }
  661. func (m *Message) GetProposalPol() *ProposalPOL {
  662. if x, ok := m.GetSum().(*Message_ProposalPol); ok {
  663. return x.ProposalPol
  664. }
  665. return nil
  666. }
  667. func (m *Message) GetBlockPart() *BlockPart {
  668. if x, ok := m.GetSum().(*Message_BlockPart); ok {
  669. return x.BlockPart
  670. }
  671. return nil
  672. }
  673. func (m *Message) GetVote() *Vote {
  674. if x, ok := m.GetSum().(*Message_Vote); ok {
  675. return x.Vote
  676. }
  677. return nil
  678. }
  679. func (m *Message) GetHasVote() *HasVote {
  680. if x, ok := m.GetSum().(*Message_HasVote); ok {
  681. return x.HasVote
  682. }
  683. return nil
  684. }
  685. func (m *Message) GetVoteSetMaj23() *VoteSetMaj23 {
  686. if x, ok := m.GetSum().(*Message_VoteSetMaj23); ok {
  687. return x.VoteSetMaj23
  688. }
  689. return nil
  690. }
  691. func (m *Message) GetVoteSetBits() *VoteSetBits {
  692. if x, ok := m.GetSum().(*Message_VoteSetBits); ok {
  693. return x.VoteSetBits
  694. }
  695. return nil
  696. }
  697. // XXX_OneofWrappers is for the internal use of the proto package.
  698. func (*Message) XXX_OneofWrappers() []interface{} {
  699. return []interface{}{
  700. (*Message_NewRoundStep)(nil),
  701. (*Message_NewValidBlock)(nil),
  702. (*Message_Proposal)(nil),
  703. (*Message_ProposalPol)(nil),
  704. (*Message_BlockPart)(nil),
  705. (*Message_Vote)(nil),
  706. (*Message_HasVote)(nil),
  707. (*Message_VoteSetMaj23)(nil),
  708. (*Message_VoteSetBits)(nil),
  709. }
  710. }
  711. func init() {
  712. proto.RegisterType((*NewRoundStep)(nil), "tendermint.consensus.NewRoundStep")
  713. proto.RegisterType((*NewValidBlock)(nil), "tendermint.consensus.NewValidBlock")
  714. proto.RegisterType((*Proposal)(nil), "tendermint.consensus.Proposal")
  715. proto.RegisterType((*ProposalPOL)(nil), "tendermint.consensus.ProposalPOL")
  716. proto.RegisterType((*BlockPart)(nil), "tendermint.consensus.BlockPart")
  717. proto.RegisterType((*Vote)(nil), "tendermint.consensus.Vote")
  718. proto.RegisterType((*HasVote)(nil), "tendermint.consensus.HasVote")
  719. proto.RegisterType((*VoteSetMaj23)(nil), "tendermint.consensus.VoteSetMaj23")
  720. proto.RegisterType((*VoteSetBits)(nil), "tendermint.consensus.VoteSetBits")
  721. proto.RegisterType((*Message)(nil), "tendermint.consensus.Message")
  722. }
  723. func init() { proto.RegisterFile("tendermint/consensus/types.proto", fileDescriptor_81a22d2efc008981) }
  724. var fileDescriptor_81a22d2efc008981 = []byte{
  725. // 853 bytes of a gzipped FileDescriptorProto
  726. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4f, 0x8f, 0xdb, 0x44,
  727. 0x14, 0xb7, 0x59, 0x67, 0x93, 0x7d, 0xde, 0xec, 0xc2, 0x68, 0x5b, 0x85, 0x00, 0x49, 0x30, 0x97,
  728. 0x15, 0x42, 0x0e, 0xca, 0x1e, 0x90, 0x0a, 0x12, 0x60, 0xfe, 0xd4, 0xad, 0x9a, 0x36, 0x72, 0x4a,
  729. 0x85, 0xb8, 0x58, 0x4e, 0x3c, 0x4a, 0x86, 0xc6, 0x1e, 0xcb, 0x33, 0xc9, 0xb2, 0x57, 0x3e, 0x01,
  730. 0x1f, 0x80, 0xaf, 0x81, 0xc4, 0x47, 0xe8, 0xb1, 0x47, 0x4e, 0x15, 0xca, 0x7e, 0x04, 0x04, 0x67,
  731. 0x34, 0xe3, 0x49, 0x3c, 0xa1, 0xde, 0x85, 0xbd, 0x20, 0xf5, 0x36, 0xe3, 0xf7, 0xde, 0x6f, 0xde,
  732. 0xfc, 0xde, 0x7b, 0x3f, 0x0f, 0xf4, 0x38, 0x4e, 0x63, 0x9c, 0x27, 0x24, 0xe5, 0xfd, 0x29, 0x4d,
  733. 0x19, 0x4e, 0xd9, 0x92, 0xf5, 0xf9, 0x45, 0x86, 0x99, 0x9b, 0xe5, 0x94, 0x53, 0x74, 0x52, 0x7a,
  734. 0xb8, 0x5b, 0x8f, 0xf6, 0xc9, 0x8c, 0xce, 0xa8, 0x74, 0xe8, 0x8b, 0x55, 0xe1, 0xdb, 0x7e, 0x5b,
  735. 0x43, 0x93, 0x18, 0x3a, 0x52, 0x5b, 0x3f, 0x6b, 0x41, 0x26, 0xac, 0x3f, 0x21, 0x7c, 0xc7, 0xc3,
  736. 0xf9, 0xc5, 0x84, 0xc3, 0x87, 0xf8, 0x3c, 0xa0, 0xcb, 0x34, 0x1e, 0x73, 0x9c, 0xa1, 0xdb, 0xb0,
  737. 0x3f, 0xc7, 0x64, 0x36, 0xe7, 0x2d, 0xb3, 0x67, 0x9e, 0xee, 0x05, 0x6a, 0x87, 0x4e, 0xa0, 0x96,
  738. 0x0b, 0xa7, 0xd6, 0x6b, 0x3d, 0xf3, 0xb4, 0x16, 0x14, 0x1b, 0x84, 0xc0, 0x62, 0x1c, 0x67, 0xad,
  739. 0xbd, 0x9e, 0x79, 0xda, 0x0c, 0xe4, 0x1a, 0x7d, 0x04, 0x2d, 0x86, 0xa7, 0x34, 0x8d, 0x59, 0xc8,
  740. 0x48, 0x3a, 0xc5, 0x21, 0xe3, 0x51, 0xce, 0x43, 0x4e, 0x12, 0xdc, 0xb2, 0x24, 0xe6, 0x2d, 0x65,
  741. 0x1f, 0x0b, 0xf3, 0x58, 0x58, 0x1f, 0x93, 0x04, 0xa3, 0xf7, 0xe1, 0x8d, 0x45, 0xc4, 0x78, 0x38,
  742. 0xa5, 0x49, 0x42, 0x78, 0x58, 0x1c, 0x57, 0x93, 0xc7, 0x1d, 0x0b, 0xc3, 0x17, 0xf2, 0xbb, 0x4c,
  743. 0xd5, 0xf9, 0xd3, 0x84, 0xe6, 0x43, 0x7c, 0xfe, 0x24, 0x5a, 0x90, 0xd8, 0x5b, 0xd0, 0xe9, 0xd3,
  744. 0x1b, 0x26, 0xfe, 0x2d, 0xdc, 0x9a, 0x88, 0xb0, 0x30, 0x13, 0xb9, 0x31, 0xcc, 0xc3, 0x39, 0x8e,
  745. 0x62, 0x9c, 0xcb, 0x9b, 0xd8, 0x83, 0xae, 0xab, 0xd5, 0xa0, 0xe0, 0x6b, 0x14, 0xe5, 0x7c, 0x8c,
  746. 0xb9, 0x2f, 0xdd, 0x3c, 0xeb, 0xd9, 0x8b, 0xae, 0x11, 0x20, 0x89, 0xb1, 0x63, 0x41, 0x9f, 0x82,
  747. 0x5d, 0x22, 0x33, 0x79, 0x63, 0x7b, 0xd0, 0xd1, 0xf1, 0x44, 0x25, 0x5c, 0x51, 0x09, 0xd7, 0x23,
  748. 0xfc, 0xf3, 0x3c, 0x8f, 0x2e, 0x02, 0xd8, 0x02, 0x31, 0xf4, 0x16, 0x1c, 0x10, 0xa6, 0x48, 0x90,
  749. 0xd7, 0x6f, 0x04, 0x0d, 0xc2, 0x8a, 0xcb, 0x3b, 0x3e, 0x34, 0x46, 0x39, 0xcd, 0x28, 0x8b, 0x16,
  750. 0xe8, 0x13, 0x68, 0x64, 0x6a, 0x2d, 0xef, 0x6c, 0x0f, 0xda, 0x15, 0x69, 0x2b, 0x0f, 0x95, 0xf1,
  751. 0x36, 0xc2, 0xf9, 0xd9, 0x04, 0x7b, 0x63, 0x1c, 0x3d, 0x7a, 0x70, 0x25, 0x7f, 0x1f, 0x00, 0xda,
  752. 0xc4, 0x84, 0x19, 0x5d, 0x84, 0x3a, 0x99, 0xaf, 0x6f, 0x2c, 0x23, 0xba, 0x90, 0x75, 0x41, 0x77,
  753. 0xe1, 0x50, 0xf7, 0x56, 0x74, 0xfe, 0xcb, 0xf5, 0x55, 0x6e, 0xb6, 0x86, 0xe6, 0x3c, 0x85, 0x03,
  754. 0x6f, 0xc3, 0xc9, 0x0d, 0x6b, 0xfb, 0x21, 0x58, 0x82, 0x7b, 0x75, 0xf6, 0xed, 0xea, 0x52, 0xaa,
  755. 0x33, 0xa5, 0xa7, 0x33, 0x00, 0xeb, 0x09, 0xe5, 0xa2, 0x03, 0xad, 0x15, 0xe5, 0x58, 0xb1, 0x59,
  756. 0x11, 0x29, 0xbc, 0x02, 0xe9, 0xe3, 0xfc, 0x68, 0x42, 0xdd, 0x8f, 0x98, 0x8c, 0xbb, 0x59, 0x7e,
  757. 0x67, 0x60, 0x09, 0x34, 0x99, 0xdf, 0x51, 0x55, 0xab, 0x8d, 0xc9, 0x2c, 0xc5, 0xf1, 0x90, 0xcd,
  758. 0x1e, 0x5f, 0x64, 0x38, 0x90, 0xce, 0x02, 0x8a, 0xa4, 0x31, 0xfe, 0x41, 0x36, 0x54, 0x2d, 0x28,
  759. 0x36, 0xce, 0xaf, 0x26, 0x1c, 0x8a, 0x0c, 0xc6, 0x98, 0x0f, 0xa3, 0xef, 0x07, 0x67, 0xff, 0x47,
  760. 0x26, 0x5f, 0x41, 0xa3, 0x68, 0x70, 0x12, 0xab, 0xee, 0x7e, 0xf3, 0xe5, 0x40, 0x59, 0xbb, 0x7b,
  761. 0x5f, 0x7a, 0xc7, 0x82, 0xe5, 0xf5, 0x8b, 0x6e, 0x5d, 0x7d, 0x08, 0xea, 0x32, 0xf6, 0x5e, 0xec,
  762. 0xfc, 0x61, 0x82, 0xad, 0x52, 0xf7, 0x08, 0x67, 0xaf, 0x4e, 0xe6, 0xe8, 0x0e, 0xd4, 0x44, 0x07,
  763. 0x30, 0x39, 0x9c, 0xff, 0xb5, 0xb9, 0x8b, 0x10, 0xe7, 0x2f, 0x0b, 0xea, 0x43, 0xcc, 0x58, 0x34,
  764. 0xc3, 0xe8, 0x3e, 0x1c, 0xa5, 0xf8, 0xbc, 0x18, 0xa8, 0x50, 0xca, 0x68, 0xd1, 0x77, 0x8e, 0x5b,
  765. 0xf5, 0x03, 0x70, 0x75, 0x99, 0xf6, 0x8d, 0xe0, 0x30, 0xd5, 0x65, 0x7b, 0x08, 0xc7, 0x02, 0x6b,
  766. 0x25, 0xf4, 0x30, 0x94, 0x89, 0x4a, 0xbe, 0xec, 0xc1, 0x7b, 0x57, 0x82, 0x95, 0xda, 0xe9, 0x1b,
  767. 0x41, 0x33, 0xdd, 0x11, 0x53, 0x5d, 0x5a, 0x2a, 0x46, 0xb8, 0xc4, 0xd9, 0x28, 0x88, 0xaf, 0x49,
  768. 0x0b, 0xfa, 0xfa, 0x1f, 0x22, 0x50, 0x70, 0xfd, 0xee, 0xf5, 0x08, 0xa3, 0x47, 0x0f, 0xfc, 0x5d,
  769. 0x0d, 0x40, 0x9f, 0x01, 0x94, 0x52, 0xaa, 0xd8, 0xee, 0x56, 0xa3, 0x6c, 0xb5, 0xc2, 0x37, 0x82,
  770. 0x83, 0xad, 0x98, 0x0a, 0x29, 0x90, 0x03, 0xbd, 0xff, 0xb2, 0x3c, 0x96, 0xb1, 0xa2, 0x0b, 0x7d,
  771. 0xa3, 0x18, 0x6b, 0x74, 0x07, 0x1a, 0xf3, 0x88, 0x85, 0x32, 0xaa, 0x2e, 0xa3, 0xde, 0xa9, 0x8e,
  772. 0x52, 0xb3, 0xef, 0x1b, 0x41, 0x7d, 0xae, 0x64, 0xe0, 0x3e, 0x1c, 0x89, 0x38, 0xf9, 0x3b, 0x49,
  773. 0xc4, 0x38, 0xb6, 0x1a, 0xd7, 0x15, 0x54, 0x1f, 0x5c, 0x51, 0xd0, 0x95, 0x3e, 0xc8, 0x77, 0xa1,
  774. 0xb9, 0xc5, 0x12, 0xfd, 0xd4, 0x3a, 0xb8, 0x8e, 0x44, 0x6d, 0x90, 0x04, 0x89, 0xab, 0x72, 0xeb,
  775. 0xd5, 0x60, 0x8f, 0x2d, 0x13, 0xef, 0x9b, 0x67, 0xeb, 0x8e, 0xf9, 0x7c, 0xdd, 0x31, 0x7f, 0x5f,
  776. 0x77, 0xcc, 0x9f, 0x2e, 0x3b, 0xc6, 0xf3, 0xcb, 0x8e, 0xf1, 0xdb, 0x65, 0xc7, 0xf8, 0xee, 0xe3,
  777. 0x19, 0xe1, 0xf3, 0xe5, 0xc4, 0x9d, 0xd2, 0xa4, 0xaf, 0xbf, 0x26, 0xca, 0x65, 0xf1, 0xea, 0xa8,
  778. 0x7a, 0xb7, 0x4c, 0xf6, 0xa5, 0xed, 0xec, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x5c, 0x91,
  779. 0x04, 0xd6, 0x08, 0x00, 0x00,
  780. }
  781. func (m *NewRoundStep) Marshal() (dAtA []byte, err error) {
  782. size := m.Size()
  783. dAtA = make([]byte, size)
  784. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  785. if err != nil {
  786. return nil, err
  787. }
  788. return dAtA[:n], nil
  789. }
  790. func (m *NewRoundStep) MarshalTo(dAtA []byte) (int, error) {
  791. size := m.Size()
  792. return m.MarshalToSizedBuffer(dAtA[:size])
  793. }
  794. func (m *NewRoundStep) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  795. i := len(dAtA)
  796. _ = i
  797. var l int
  798. _ = l
  799. if m.LastCommitRound != 0 {
  800. i = encodeVarintTypes(dAtA, i, uint64(m.LastCommitRound))
  801. i--
  802. dAtA[i] = 0x28
  803. }
  804. if m.SecondsSinceStartTime != 0 {
  805. i = encodeVarintTypes(dAtA, i, uint64(m.SecondsSinceStartTime))
  806. i--
  807. dAtA[i] = 0x20
  808. }
  809. if m.Step != 0 {
  810. i = encodeVarintTypes(dAtA, i, uint64(m.Step))
  811. i--
  812. dAtA[i] = 0x18
  813. }
  814. if m.Round != 0 {
  815. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  816. i--
  817. dAtA[i] = 0x10
  818. }
  819. if m.Height != 0 {
  820. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  821. i--
  822. dAtA[i] = 0x8
  823. }
  824. return len(dAtA) - i, nil
  825. }
  826. func (m *NewValidBlock) Marshal() (dAtA []byte, err error) {
  827. size := m.Size()
  828. dAtA = make([]byte, size)
  829. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  830. if err != nil {
  831. return nil, err
  832. }
  833. return dAtA[:n], nil
  834. }
  835. func (m *NewValidBlock) MarshalTo(dAtA []byte) (int, error) {
  836. size := m.Size()
  837. return m.MarshalToSizedBuffer(dAtA[:size])
  838. }
  839. func (m *NewValidBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  840. i := len(dAtA)
  841. _ = i
  842. var l int
  843. _ = l
  844. if m.IsCommit {
  845. i--
  846. if m.IsCommit {
  847. dAtA[i] = 1
  848. } else {
  849. dAtA[i] = 0
  850. }
  851. i--
  852. dAtA[i] = 0x28
  853. }
  854. if m.BlockParts != nil {
  855. {
  856. size, err := m.BlockParts.MarshalToSizedBuffer(dAtA[:i])
  857. if err != nil {
  858. return 0, err
  859. }
  860. i -= size
  861. i = encodeVarintTypes(dAtA, i, uint64(size))
  862. }
  863. i--
  864. dAtA[i] = 0x22
  865. }
  866. {
  867. size, err := m.BlockPartSetHeader.MarshalToSizedBuffer(dAtA[:i])
  868. if err != nil {
  869. return 0, err
  870. }
  871. i -= size
  872. i = encodeVarintTypes(dAtA, i, uint64(size))
  873. }
  874. i--
  875. dAtA[i] = 0x1a
  876. if m.Round != 0 {
  877. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  878. i--
  879. dAtA[i] = 0x10
  880. }
  881. if m.Height != 0 {
  882. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  883. i--
  884. dAtA[i] = 0x8
  885. }
  886. return len(dAtA) - i, nil
  887. }
  888. func (m *Proposal) Marshal() (dAtA []byte, err error) {
  889. size := m.Size()
  890. dAtA = make([]byte, size)
  891. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  892. if err != nil {
  893. return nil, err
  894. }
  895. return dAtA[:n], nil
  896. }
  897. func (m *Proposal) MarshalTo(dAtA []byte) (int, error) {
  898. size := m.Size()
  899. return m.MarshalToSizedBuffer(dAtA[:size])
  900. }
  901. func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  902. i := len(dAtA)
  903. _ = i
  904. var l int
  905. _ = l
  906. {
  907. size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i])
  908. if err != nil {
  909. return 0, err
  910. }
  911. i -= size
  912. i = encodeVarintTypes(dAtA, i, uint64(size))
  913. }
  914. i--
  915. dAtA[i] = 0xa
  916. return len(dAtA) - i, nil
  917. }
  918. func (m *ProposalPOL) Marshal() (dAtA []byte, err error) {
  919. size := m.Size()
  920. dAtA = make([]byte, size)
  921. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  922. if err != nil {
  923. return nil, err
  924. }
  925. return dAtA[:n], nil
  926. }
  927. func (m *ProposalPOL) MarshalTo(dAtA []byte) (int, error) {
  928. size := m.Size()
  929. return m.MarshalToSizedBuffer(dAtA[:size])
  930. }
  931. func (m *ProposalPOL) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  932. i := len(dAtA)
  933. _ = i
  934. var l int
  935. _ = l
  936. {
  937. size, err := m.ProposalPol.MarshalToSizedBuffer(dAtA[:i])
  938. if err != nil {
  939. return 0, err
  940. }
  941. i -= size
  942. i = encodeVarintTypes(dAtA, i, uint64(size))
  943. }
  944. i--
  945. dAtA[i] = 0x1a
  946. if m.ProposalPolRound != 0 {
  947. i = encodeVarintTypes(dAtA, i, uint64(m.ProposalPolRound))
  948. i--
  949. dAtA[i] = 0x10
  950. }
  951. if m.Height != 0 {
  952. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  953. i--
  954. dAtA[i] = 0x8
  955. }
  956. return len(dAtA) - i, nil
  957. }
  958. func (m *BlockPart) Marshal() (dAtA []byte, err error) {
  959. size := m.Size()
  960. dAtA = make([]byte, size)
  961. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  962. if err != nil {
  963. return nil, err
  964. }
  965. return dAtA[:n], nil
  966. }
  967. func (m *BlockPart) MarshalTo(dAtA []byte) (int, error) {
  968. size := m.Size()
  969. return m.MarshalToSizedBuffer(dAtA[:size])
  970. }
  971. func (m *BlockPart) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  972. i := len(dAtA)
  973. _ = i
  974. var l int
  975. _ = l
  976. {
  977. size, err := m.Part.MarshalToSizedBuffer(dAtA[:i])
  978. if err != nil {
  979. return 0, err
  980. }
  981. i -= size
  982. i = encodeVarintTypes(dAtA, i, uint64(size))
  983. }
  984. i--
  985. dAtA[i] = 0x1a
  986. if m.Round != 0 {
  987. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  988. i--
  989. dAtA[i] = 0x10
  990. }
  991. if m.Height != 0 {
  992. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  993. i--
  994. dAtA[i] = 0x8
  995. }
  996. return len(dAtA) - i, nil
  997. }
  998. func (m *Vote) Marshal() (dAtA []byte, err error) {
  999. size := m.Size()
  1000. dAtA = make([]byte, size)
  1001. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1002. if err != nil {
  1003. return nil, err
  1004. }
  1005. return dAtA[:n], nil
  1006. }
  1007. func (m *Vote) MarshalTo(dAtA []byte) (int, error) {
  1008. size := m.Size()
  1009. return m.MarshalToSizedBuffer(dAtA[:size])
  1010. }
  1011. func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1012. i := len(dAtA)
  1013. _ = i
  1014. var l int
  1015. _ = l
  1016. if m.Vote != nil {
  1017. {
  1018. size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i])
  1019. if err != nil {
  1020. return 0, err
  1021. }
  1022. i -= size
  1023. i = encodeVarintTypes(dAtA, i, uint64(size))
  1024. }
  1025. i--
  1026. dAtA[i] = 0xa
  1027. }
  1028. return len(dAtA) - i, nil
  1029. }
  1030. func (m *HasVote) Marshal() (dAtA []byte, err error) {
  1031. size := m.Size()
  1032. dAtA = make([]byte, size)
  1033. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1034. if err != nil {
  1035. return nil, err
  1036. }
  1037. return dAtA[:n], nil
  1038. }
  1039. func (m *HasVote) MarshalTo(dAtA []byte) (int, error) {
  1040. size := m.Size()
  1041. return m.MarshalToSizedBuffer(dAtA[:size])
  1042. }
  1043. func (m *HasVote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1044. i := len(dAtA)
  1045. _ = i
  1046. var l int
  1047. _ = l
  1048. if m.Index != 0 {
  1049. i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  1050. i--
  1051. dAtA[i] = 0x20
  1052. }
  1053. if m.Type != 0 {
  1054. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  1055. i--
  1056. dAtA[i] = 0x18
  1057. }
  1058. if m.Round != 0 {
  1059. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  1060. i--
  1061. dAtA[i] = 0x10
  1062. }
  1063. if m.Height != 0 {
  1064. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1065. i--
  1066. dAtA[i] = 0x8
  1067. }
  1068. return len(dAtA) - i, nil
  1069. }
  1070. func (m *VoteSetMaj23) Marshal() (dAtA []byte, err error) {
  1071. size := m.Size()
  1072. dAtA = make([]byte, size)
  1073. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1074. if err != nil {
  1075. return nil, err
  1076. }
  1077. return dAtA[:n], nil
  1078. }
  1079. func (m *VoteSetMaj23) MarshalTo(dAtA []byte) (int, error) {
  1080. size := m.Size()
  1081. return m.MarshalToSizedBuffer(dAtA[:size])
  1082. }
  1083. func (m *VoteSetMaj23) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1084. i := len(dAtA)
  1085. _ = i
  1086. var l int
  1087. _ = l
  1088. {
  1089. size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i])
  1090. if err != nil {
  1091. return 0, err
  1092. }
  1093. i -= size
  1094. i = encodeVarintTypes(dAtA, i, uint64(size))
  1095. }
  1096. i--
  1097. dAtA[i] = 0x22
  1098. if m.Type != 0 {
  1099. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  1100. i--
  1101. dAtA[i] = 0x18
  1102. }
  1103. if m.Round != 0 {
  1104. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  1105. i--
  1106. dAtA[i] = 0x10
  1107. }
  1108. if m.Height != 0 {
  1109. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1110. i--
  1111. dAtA[i] = 0x8
  1112. }
  1113. return len(dAtA) - i, nil
  1114. }
  1115. func (m *VoteSetBits) Marshal() (dAtA []byte, err error) {
  1116. size := m.Size()
  1117. dAtA = make([]byte, size)
  1118. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1119. if err != nil {
  1120. return nil, err
  1121. }
  1122. return dAtA[:n], nil
  1123. }
  1124. func (m *VoteSetBits) MarshalTo(dAtA []byte) (int, error) {
  1125. size := m.Size()
  1126. return m.MarshalToSizedBuffer(dAtA[:size])
  1127. }
  1128. func (m *VoteSetBits) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1129. i := len(dAtA)
  1130. _ = i
  1131. var l int
  1132. _ = l
  1133. {
  1134. size, err := m.Votes.MarshalToSizedBuffer(dAtA[:i])
  1135. if err != nil {
  1136. return 0, err
  1137. }
  1138. i -= size
  1139. i = encodeVarintTypes(dAtA, i, uint64(size))
  1140. }
  1141. i--
  1142. dAtA[i] = 0x2a
  1143. {
  1144. size, err := m.BlockID.MarshalToSizedBuffer(dAtA[:i])
  1145. if err != nil {
  1146. return 0, err
  1147. }
  1148. i -= size
  1149. i = encodeVarintTypes(dAtA, i, uint64(size))
  1150. }
  1151. i--
  1152. dAtA[i] = 0x22
  1153. if m.Type != 0 {
  1154. i = encodeVarintTypes(dAtA, i, uint64(m.Type))
  1155. i--
  1156. dAtA[i] = 0x18
  1157. }
  1158. if m.Round != 0 {
  1159. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  1160. i--
  1161. dAtA[i] = 0x10
  1162. }
  1163. if m.Height != 0 {
  1164. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1165. i--
  1166. dAtA[i] = 0x8
  1167. }
  1168. return len(dAtA) - i, nil
  1169. }
  1170. func (m *Message) Marshal() (dAtA []byte, err error) {
  1171. size := m.Size()
  1172. dAtA = make([]byte, size)
  1173. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1174. if err != nil {
  1175. return nil, err
  1176. }
  1177. return dAtA[:n], nil
  1178. }
  1179. func (m *Message) MarshalTo(dAtA []byte) (int, error) {
  1180. size := m.Size()
  1181. return m.MarshalToSizedBuffer(dAtA[:size])
  1182. }
  1183. func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1184. i := len(dAtA)
  1185. _ = i
  1186. var l int
  1187. _ = l
  1188. if m.Sum != nil {
  1189. {
  1190. size := m.Sum.Size()
  1191. i -= size
  1192. if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil {
  1193. return 0, err
  1194. }
  1195. }
  1196. }
  1197. return len(dAtA) - i, nil
  1198. }
  1199. func (m *Message_NewRoundStep) MarshalTo(dAtA []byte) (int, error) {
  1200. size := m.Size()
  1201. return m.MarshalToSizedBuffer(dAtA[:size])
  1202. }
  1203. func (m *Message_NewRoundStep) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1204. i := len(dAtA)
  1205. if m.NewRoundStep != nil {
  1206. {
  1207. size, err := m.NewRoundStep.MarshalToSizedBuffer(dAtA[:i])
  1208. if err != nil {
  1209. return 0, err
  1210. }
  1211. i -= size
  1212. i = encodeVarintTypes(dAtA, i, uint64(size))
  1213. }
  1214. i--
  1215. dAtA[i] = 0xa
  1216. }
  1217. return len(dAtA) - i, nil
  1218. }
  1219. func (m *Message_NewValidBlock) MarshalTo(dAtA []byte) (int, error) {
  1220. size := m.Size()
  1221. return m.MarshalToSizedBuffer(dAtA[:size])
  1222. }
  1223. func (m *Message_NewValidBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1224. i := len(dAtA)
  1225. if m.NewValidBlock != nil {
  1226. {
  1227. size, err := m.NewValidBlock.MarshalToSizedBuffer(dAtA[:i])
  1228. if err != nil {
  1229. return 0, err
  1230. }
  1231. i -= size
  1232. i = encodeVarintTypes(dAtA, i, uint64(size))
  1233. }
  1234. i--
  1235. dAtA[i] = 0x12
  1236. }
  1237. return len(dAtA) - i, nil
  1238. }
  1239. func (m *Message_Proposal) MarshalTo(dAtA []byte) (int, error) {
  1240. size := m.Size()
  1241. return m.MarshalToSizedBuffer(dAtA[:size])
  1242. }
  1243. func (m *Message_Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1244. i := len(dAtA)
  1245. if m.Proposal != nil {
  1246. {
  1247. size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i])
  1248. if err != nil {
  1249. return 0, err
  1250. }
  1251. i -= size
  1252. i = encodeVarintTypes(dAtA, i, uint64(size))
  1253. }
  1254. i--
  1255. dAtA[i] = 0x1a
  1256. }
  1257. return len(dAtA) - i, nil
  1258. }
  1259. func (m *Message_ProposalPol) MarshalTo(dAtA []byte) (int, error) {
  1260. size := m.Size()
  1261. return m.MarshalToSizedBuffer(dAtA[:size])
  1262. }
  1263. func (m *Message_ProposalPol) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1264. i := len(dAtA)
  1265. if m.ProposalPol != nil {
  1266. {
  1267. size, err := m.ProposalPol.MarshalToSizedBuffer(dAtA[:i])
  1268. if err != nil {
  1269. return 0, err
  1270. }
  1271. i -= size
  1272. i = encodeVarintTypes(dAtA, i, uint64(size))
  1273. }
  1274. i--
  1275. dAtA[i] = 0x22
  1276. }
  1277. return len(dAtA) - i, nil
  1278. }
  1279. func (m *Message_BlockPart) MarshalTo(dAtA []byte) (int, error) {
  1280. size := m.Size()
  1281. return m.MarshalToSizedBuffer(dAtA[:size])
  1282. }
  1283. func (m *Message_BlockPart) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1284. i := len(dAtA)
  1285. if m.BlockPart != nil {
  1286. {
  1287. size, err := m.BlockPart.MarshalToSizedBuffer(dAtA[:i])
  1288. if err != nil {
  1289. return 0, err
  1290. }
  1291. i -= size
  1292. i = encodeVarintTypes(dAtA, i, uint64(size))
  1293. }
  1294. i--
  1295. dAtA[i] = 0x2a
  1296. }
  1297. return len(dAtA) - i, nil
  1298. }
  1299. func (m *Message_Vote) MarshalTo(dAtA []byte) (int, error) {
  1300. size := m.Size()
  1301. return m.MarshalToSizedBuffer(dAtA[:size])
  1302. }
  1303. func (m *Message_Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1304. i := len(dAtA)
  1305. if m.Vote != nil {
  1306. {
  1307. size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i])
  1308. if err != nil {
  1309. return 0, err
  1310. }
  1311. i -= size
  1312. i = encodeVarintTypes(dAtA, i, uint64(size))
  1313. }
  1314. i--
  1315. dAtA[i] = 0x32
  1316. }
  1317. return len(dAtA) - i, nil
  1318. }
  1319. func (m *Message_HasVote) MarshalTo(dAtA []byte) (int, error) {
  1320. size := m.Size()
  1321. return m.MarshalToSizedBuffer(dAtA[:size])
  1322. }
  1323. func (m *Message_HasVote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1324. i := len(dAtA)
  1325. if m.HasVote != nil {
  1326. {
  1327. size, err := m.HasVote.MarshalToSizedBuffer(dAtA[:i])
  1328. if err != nil {
  1329. return 0, err
  1330. }
  1331. i -= size
  1332. i = encodeVarintTypes(dAtA, i, uint64(size))
  1333. }
  1334. i--
  1335. dAtA[i] = 0x3a
  1336. }
  1337. return len(dAtA) - i, nil
  1338. }
  1339. func (m *Message_VoteSetMaj23) MarshalTo(dAtA []byte) (int, error) {
  1340. size := m.Size()
  1341. return m.MarshalToSizedBuffer(dAtA[:size])
  1342. }
  1343. func (m *Message_VoteSetMaj23) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1344. i := len(dAtA)
  1345. if m.VoteSetMaj23 != nil {
  1346. {
  1347. size, err := m.VoteSetMaj23.MarshalToSizedBuffer(dAtA[:i])
  1348. if err != nil {
  1349. return 0, err
  1350. }
  1351. i -= size
  1352. i = encodeVarintTypes(dAtA, i, uint64(size))
  1353. }
  1354. i--
  1355. dAtA[i] = 0x42
  1356. }
  1357. return len(dAtA) - i, nil
  1358. }
  1359. func (m *Message_VoteSetBits) MarshalTo(dAtA []byte) (int, error) {
  1360. size := m.Size()
  1361. return m.MarshalToSizedBuffer(dAtA[:size])
  1362. }
  1363. func (m *Message_VoteSetBits) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1364. i := len(dAtA)
  1365. if m.VoteSetBits != nil {
  1366. {
  1367. size, err := m.VoteSetBits.MarshalToSizedBuffer(dAtA[:i])
  1368. if err != nil {
  1369. return 0, err
  1370. }
  1371. i -= size
  1372. i = encodeVarintTypes(dAtA, i, uint64(size))
  1373. }
  1374. i--
  1375. dAtA[i] = 0x4a
  1376. }
  1377. return len(dAtA) - i, nil
  1378. }
  1379. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  1380. offset -= sovTypes(v)
  1381. base := offset
  1382. for v >= 1<<7 {
  1383. dAtA[offset] = uint8(v&0x7f | 0x80)
  1384. v >>= 7
  1385. offset++
  1386. }
  1387. dAtA[offset] = uint8(v)
  1388. return base
  1389. }
  1390. func (m *NewRoundStep) Size() (n int) {
  1391. if m == nil {
  1392. return 0
  1393. }
  1394. var l int
  1395. _ = l
  1396. if m.Height != 0 {
  1397. n += 1 + sovTypes(uint64(m.Height))
  1398. }
  1399. if m.Round != 0 {
  1400. n += 1 + sovTypes(uint64(m.Round))
  1401. }
  1402. if m.Step != 0 {
  1403. n += 1 + sovTypes(uint64(m.Step))
  1404. }
  1405. if m.SecondsSinceStartTime != 0 {
  1406. n += 1 + sovTypes(uint64(m.SecondsSinceStartTime))
  1407. }
  1408. if m.LastCommitRound != 0 {
  1409. n += 1 + sovTypes(uint64(m.LastCommitRound))
  1410. }
  1411. return n
  1412. }
  1413. func (m *NewValidBlock) Size() (n int) {
  1414. if m == nil {
  1415. return 0
  1416. }
  1417. var l int
  1418. _ = l
  1419. if m.Height != 0 {
  1420. n += 1 + sovTypes(uint64(m.Height))
  1421. }
  1422. if m.Round != 0 {
  1423. n += 1 + sovTypes(uint64(m.Round))
  1424. }
  1425. l = m.BlockPartSetHeader.Size()
  1426. n += 1 + l + sovTypes(uint64(l))
  1427. if m.BlockParts != nil {
  1428. l = m.BlockParts.Size()
  1429. n += 1 + l + sovTypes(uint64(l))
  1430. }
  1431. if m.IsCommit {
  1432. n += 2
  1433. }
  1434. return n
  1435. }
  1436. func (m *Proposal) Size() (n int) {
  1437. if m == nil {
  1438. return 0
  1439. }
  1440. var l int
  1441. _ = l
  1442. l = m.Proposal.Size()
  1443. n += 1 + l + sovTypes(uint64(l))
  1444. return n
  1445. }
  1446. func (m *ProposalPOL) Size() (n int) {
  1447. if m == nil {
  1448. return 0
  1449. }
  1450. var l int
  1451. _ = l
  1452. if m.Height != 0 {
  1453. n += 1 + sovTypes(uint64(m.Height))
  1454. }
  1455. if m.ProposalPolRound != 0 {
  1456. n += 1 + sovTypes(uint64(m.ProposalPolRound))
  1457. }
  1458. l = m.ProposalPol.Size()
  1459. n += 1 + l + sovTypes(uint64(l))
  1460. return n
  1461. }
  1462. func (m *BlockPart) Size() (n int) {
  1463. if m == nil {
  1464. return 0
  1465. }
  1466. var l int
  1467. _ = l
  1468. if m.Height != 0 {
  1469. n += 1 + sovTypes(uint64(m.Height))
  1470. }
  1471. if m.Round != 0 {
  1472. n += 1 + sovTypes(uint64(m.Round))
  1473. }
  1474. l = m.Part.Size()
  1475. n += 1 + l + sovTypes(uint64(l))
  1476. return n
  1477. }
  1478. func (m *Vote) Size() (n int) {
  1479. if m == nil {
  1480. return 0
  1481. }
  1482. var l int
  1483. _ = l
  1484. if m.Vote != nil {
  1485. l = m.Vote.Size()
  1486. n += 1 + l + sovTypes(uint64(l))
  1487. }
  1488. return n
  1489. }
  1490. func (m *HasVote) Size() (n int) {
  1491. if m == nil {
  1492. return 0
  1493. }
  1494. var l int
  1495. _ = l
  1496. if m.Height != 0 {
  1497. n += 1 + sovTypes(uint64(m.Height))
  1498. }
  1499. if m.Round != 0 {
  1500. n += 1 + sovTypes(uint64(m.Round))
  1501. }
  1502. if m.Type != 0 {
  1503. n += 1 + sovTypes(uint64(m.Type))
  1504. }
  1505. if m.Index != 0 {
  1506. n += 1 + sovTypes(uint64(m.Index))
  1507. }
  1508. return n
  1509. }
  1510. func (m *VoteSetMaj23) Size() (n int) {
  1511. if m == nil {
  1512. return 0
  1513. }
  1514. var l int
  1515. _ = l
  1516. if m.Height != 0 {
  1517. n += 1 + sovTypes(uint64(m.Height))
  1518. }
  1519. if m.Round != 0 {
  1520. n += 1 + sovTypes(uint64(m.Round))
  1521. }
  1522. if m.Type != 0 {
  1523. n += 1 + sovTypes(uint64(m.Type))
  1524. }
  1525. l = m.BlockID.Size()
  1526. n += 1 + l + sovTypes(uint64(l))
  1527. return n
  1528. }
  1529. func (m *VoteSetBits) Size() (n int) {
  1530. if m == nil {
  1531. return 0
  1532. }
  1533. var l int
  1534. _ = l
  1535. if m.Height != 0 {
  1536. n += 1 + sovTypes(uint64(m.Height))
  1537. }
  1538. if m.Round != 0 {
  1539. n += 1 + sovTypes(uint64(m.Round))
  1540. }
  1541. if m.Type != 0 {
  1542. n += 1 + sovTypes(uint64(m.Type))
  1543. }
  1544. l = m.BlockID.Size()
  1545. n += 1 + l + sovTypes(uint64(l))
  1546. l = m.Votes.Size()
  1547. n += 1 + l + sovTypes(uint64(l))
  1548. return n
  1549. }
  1550. func (m *Message) Size() (n int) {
  1551. if m == nil {
  1552. return 0
  1553. }
  1554. var l int
  1555. _ = l
  1556. if m.Sum != nil {
  1557. n += m.Sum.Size()
  1558. }
  1559. return n
  1560. }
  1561. func (m *Message_NewRoundStep) Size() (n int) {
  1562. if m == nil {
  1563. return 0
  1564. }
  1565. var l int
  1566. _ = l
  1567. if m.NewRoundStep != nil {
  1568. l = m.NewRoundStep.Size()
  1569. n += 1 + l + sovTypes(uint64(l))
  1570. }
  1571. return n
  1572. }
  1573. func (m *Message_NewValidBlock) Size() (n int) {
  1574. if m == nil {
  1575. return 0
  1576. }
  1577. var l int
  1578. _ = l
  1579. if m.NewValidBlock != nil {
  1580. l = m.NewValidBlock.Size()
  1581. n += 1 + l + sovTypes(uint64(l))
  1582. }
  1583. return n
  1584. }
  1585. func (m *Message_Proposal) Size() (n int) {
  1586. if m == nil {
  1587. return 0
  1588. }
  1589. var l int
  1590. _ = l
  1591. if m.Proposal != nil {
  1592. l = m.Proposal.Size()
  1593. n += 1 + l + sovTypes(uint64(l))
  1594. }
  1595. return n
  1596. }
  1597. func (m *Message_ProposalPol) Size() (n int) {
  1598. if m == nil {
  1599. return 0
  1600. }
  1601. var l int
  1602. _ = l
  1603. if m.ProposalPol != nil {
  1604. l = m.ProposalPol.Size()
  1605. n += 1 + l + sovTypes(uint64(l))
  1606. }
  1607. return n
  1608. }
  1609. func (m *Message_BlockPart) Size() (n int) {
  1610. if m == nil {
  1611. return 0
  1612. }
  1613. var l int
  1614. _ = l
  1615. if m.BlockPart != nil {
  1616. l = m.BlockPart.Size()
  1617. n += 1 + l + sovTypes(uint64(l))
  1618. }
  1619. return n
  1620. }
  1621. func (m *Message_Vote) Size() (n int) {
  1622. if m == nil {
  1623. return 0
  1624. }
  1625. var l int
  1626. _ = l
  1627. if m.Vote != nil {
  1628. l = m.Vote.Size()
  1629. n += 1 + l + sovTypes(uint64(l))
  1630. }
  1631. return n
  1632. }
  1633. func (m *Message_HasVote) Size() (n int) {
  1634. if m == nil {
  1635. return 0
  1636. }
  1637. var l int
  1638. _ = l
  1639. if m.HasVote != nil {
  1640. l = m.HasVote.Size()
  1641. n += 1 + l + sovTypes(uint64(l))
  1642. }
  1643. return n
  1644. }
  1645. func (m *Message_VoteSetMaj23) Size() (n int) {
  1646. if m == nil {
  1647. return 0
  1648. }
  1649. var l int
  1650. _ = l
  1651. if m.VoteSetMaj23 != nil {
  1652. l = m.VoteSetMaj23.Size()
  1653. n += 1 + l + sovTypes(uint64(l))
  1654. }
  1655. return n
  1656. }
  1657. func (m *Message_VoteSetBits) Size() (n int) {
  1658. if m == nil {
  1659. return 0
  1660. }
  1661. var l int
  1662. _ = l
  1663. if m.VoteSetBits != nil {
  1664. l = m.VoteSetBits.Size()
  1665. n += 1 + l + sovTypes(uint64(l))
  1666. }
  1667. return n
  1668. }
  1669. func sovTypes(x uint64) (n int) {
  1670. return (math_bits.Len64(x|1) + 6) / 7
  1671. }
  1672. func sozTypes(x uint64) (n int) {
  1673. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1674. }
  1675. func (m *NewRoundStep) Unmarshal(dAtA []byte) error {
  1676. l := len(dAtA)
  1677. iNdEx := 0
  1678. for iNdEx < l {
  1679. preIndex := iNdEx
  1680. var wire uint64
  1681. for shift := uint(0); ; shift += 7 {
  1682. if shift >= 64 {
  1683. return ErrIntOverflowTypes
  1684. }
  1685. if iNdEx >= l {
  1686. return io.ErrUnexpectedEOF
  1687. }
  1688. b := dAtA[iNdEx]
  1689. iNdEx++
  1690. wire |= uint64(b&0x7F) << shift
  1691. if b < 0x80 {
  1692. break
  1693. }
  1694. }
  1695. fieldNum := int32(wire >> 3)
  1696. wireType := int(wire & 0x7)
  1697. if wireType == 4 {
  1698. return fmt.Errorf("proto: NewRoundStep: wiretype end group for non-group")
  1699. }
  1700. if fieldNum <= 0 {
  1701. return fmt.Errorf("proto: NewRoundStep: illegal tag %d (wire type %d)", fieldNum, wire)
  1702. }
  1703. switch fieldNum {
  1704. case 1:
  1705. if wireType != 0 {
  1706. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  1707. }
  1708. m.Height = 0
  1709. for shift := uint(0); ; shift += 7 {
  1710. if shift >= 64 {
  1711. return ErrIntOverflowTypes
  1712. }
  1713. if iNdEx >= l {
  1714. return io.ErrUnexpectedEOF
  1715. }
  1716. b := dAtA[iNdEx]
  1717. iNdEx++
  1718. m.Height |= int64(b&0x7F) << shift
  1719. if b < 0x80 {
  1720. break
  1721. }
  1722. }
  1723. case 2:
  1724. if wireType != 0 {
  1725. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  1726. }
  1727. m.Round = 0
  1728. for shift := uint(0); ; shift += 7 {
  1729. if shift >= 64 {
  1730. return ErrIntOverflowTypes
  1731. }
  1732. if iNdEx >= l {
  1733. return io.ErrUnexpectedEOF
  1734. }
  1735. b := dAtA[iNdEx]
  1736. iNdEx++
  1737. m.Round |= int32(b&0x7F) << shift
  1738. if b < 0x80 {
  1739. break
  1740. }
  1741. }
  1742. case 3:
  1743. if wireType != 0 {
  1744. return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType)
  1745. }
  1746. m.Step = 0
  1747. for shift := uint(0); ; shift += 7 {
  1748. if shift >= 64 {
  1749. return ErrIntOverflowTypes
  1750. }
  1751. if iNdEx >= l {
  1752. return io.ErrUnexpectedEOF
  1753. }
  1754. b := dAtA[iNdEx]
  1755. iNdEx++
  1756. m.Step |= uint32(b&0x7F) << shift
  1757. if b < 0x80 {
  1758. break
  1759. }
  1760. }
  1761. case 4:
  1762. if wireType != 0 {
  1763. return fmt.Errorf("proto: wrong wireType = %d for field SecondsSinceStartTime", wireType)
  1764. }
  1765. m.SecondsSinceStartTime = 0
  1766. for shift := uint(0); ; shift += 7 {
  1767. if shift >= 64 {
  1768. return ErrIntOverflowTypes
  1769. }
  1770. if iNdEx >= l {
  1771. return io.ErrUnexpectedEOF
  1772. }
  1773. b := dAtA[iNdEx]
  1774. iNdEx++
  1775. m.SecondsSinceStartTime |= int64(b&0x7F) << shift
  1776. if b < 0x80 {
  1777. break
  1778. }
  1779. }
  1780. case 5:
  1781. if wireType != 0 {
  1782. return fmt.Errorf("proto: wrong wireType = %d for field LastCommitRound", wireType)
  1783. }
  1784. m.LastCommitRound = 0
  1785. for shift := uint(0); ; shift += 7 {
  1786. if shift >= 64 {
  1787. return ErrIntOverflowTypes
  1788. }
  1789. if iNdEx >= l {
  1790. return io.ErrUnexpectedEOF
  1791. }
  1792. b := dAtA[iNdEx]
  1793. iNdEx++
  1794. m.LastCommitRound |= int32(b&0x7F) << shift
  1795. if b < 0x80 {
  1796. break
  1797. }
  1798. }
  1799. default:
  1800. iNdEx = preIndex
  1801. skippy, err := skipTypes(dAtA[iNdEx:])
  1802. if err != nil {
  1803. return err
  1804. }
  1805. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1806. return ErrInvalidLengthTypes
  1807. }
  1808. if (iNdEx + skippy) > l {
  1809. return io.ErrUnexpectedEOF
  1810. }
  1811. iNdEx += skippy
  1812. }
  1813. }
  1814. if iNdEx > l {
  1815. return io.ErrUnexpectedEOF
  1816. }
  1817. return nil
  1818. }
  1819. func (m *NewValidBlock) Unmarshal(dAtA []byte) error {
  1820. l := len(dAtA)
  1821. iNdEx := 0
  1822. for iNdEx < l {
  1823. preIndex := iNdEx
  1824. var wire uint64
  1825. for shift := uint(0); ; shift += 7 {
  1826. if shift >= 64 {
  1827. return ErrIntOverflowTypes
  1828. }
  1829. if iNdEx >= l {
  1830. return io.ErrUnexpectedEOF
  1831. }
  1832. b := dAtA[iNdEx]
  1833. iNdEx++
  1834. wire |= uint64(b&0x7F) << shift
  1835. if b < 0x80 {
  1836. break
  1837. }
  1838. }
  1839. fieldNum := int32(wire >> 3)
  1840. wireType := int(wire & 0x7)
  1841. if wireType == 4 {
  1842. return fmt.Errorf("proto: NewValidBlock: wiretype end group for non-group")
  1843. }
  1844. if fieldNum <= 0 {
  1845. return fmt.Errorf("proto: NewValidBlock: illegal tag %d (wire type %d)", fieldNum, wire)
  1846. }
  1847. switch fieldNum {
  1848. case 1:
  1849. if wireType != 0 {
  1850. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  1851. }
  1852. m.Height = 0
  1853. for shift := uint(0); ; shift += 7 {
  1854. if shift >= 64 {
  1855. return ErrIntOverflowTypes
  1856. }
  1857. if iNdEx >= l {
  1858. return io.ErrUnexpectedEOF
  1859. }
  1860. b := dAtA[iNdEx]
  1861. iNdEx++
  1862. m.Height |= int64(b&0x7F) << shift
  1863. if b < 0x80 {
  1864. break
  1865. }
  1866. }
  1867. case 2:
  1868. if wireType != 0 {
  1869. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  1870. }
  1871. m.Round = 0
  1872. for shift := uint(0); ; shift += 7 {
  1873. if shift >= 64 {
  1874. return ErrIntOverflowTypes
  1875. }
  1876. if iNdEx >= l {
  1877. return io.ErrUnexpectedEOF
  1878. }
  1879. b := dAtA[iNdEx]
  1880. iNdEx++
  1881. m.Round |= int32(b&0x7F) << shift
  1882. if b < 0x80 {
  1883. break
  1884. }
  1885. }
  1886. case 3:
  1887. if wireType != 2 {
  1888. return fmt.Errorf("proto: wrong wireType = %d for field BlockPartSetHeader", wireType)
  1889. }
  1890. var msglen int
  1891. for shift := uint(0); ; shift += 7 {
  1892. if shift >= 64 {
  1893. return ErrIntOverflowTypes
  1894. }
  1895. if iNdEx >= l {
  1896. return io.ErrUnexpectedEOF
  1897. }
  1898. b := dAtA[iNdEx]
  1899. iNdEx++
  1900. msglen |= int(b&0x7F) << shift
  1901. if b < 0x80 {
  1902. break
  1903. }
  1904. }
  1905. if msglen < 0 {
  1906. return ErrInvalidLengthTypes
  1907. }
  1908. postIndex := iNdEx + msglen
  1909. if postIndex < 0 {
  1910. return ErrInvalidLengthTypes
  1911. }
  1912. if postIndex > l {
  1913. return io.ErrUnexpectedEOF
  1914. }
  1915. if err := m.BlockPartSetHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1916. return err
  1917. }
  1918. iNdEx = postIndex
  1919. case 4:
  1920. if wireType != 2 {
  1921. return fmt.Errorf("proto: wrong wireType = %d for field BlockParts", wireType)
  1922. }
  1923. var msglen int
  1924. for shift := uint(0); ; shift += 7 {
  1925. if shift >= 64 {
  1926. return ErrIntOverflowTypes
  1927. }
  1928. if iNdEx >= l {
  1929. return io.ErrUnexpectedEOF
  1930. }
  1931. b := dAtA[iNdEx]
  1932. iNdEx++
  1933. msglen |= int(b&0x7F) << shift
  1934. if b < 0x80 {
  1935. break
  1936. }
  1937. }
  1938. if msglen < 0 {
  1939. return ErrInvalidLengthTypes
  1940. }
  1941. postIndex := iNdEx + msglen
  1942. if postIndex < 0 {
  1943. return ErrInvalidLengthTypes
  1944. }
  1945. if postIndex > l {
  1946. return io.ErrUnexpectedEOF
  1947. }
  1948. if m.BlockParts == nil {
  1949. m.BlockParts = &bits.BitArray{}
  1950. }
  1951. if err := m.BlockParts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1952. return err
  1953. }
  1954. iNdEx = postIndex
  1955. case 5:
  1956. if wireType != 0 {
  1957. return fmt.Errorf("proto: wrong wireType = %d for field IsCommit", wireType)
  1958. }
  1959. var v int
  1960. for shift := uint(0); ; shift += 7 {
  1961. if shift >= 64 {
  1962. return ErrIntOverflowTypes
  1963. }
  1964. if iNdEx >= l {
  1965. return io.ErrUnexpectedEOF
  1966. }
  1967. b := dAtA[iNdEx]
  1968. iNdEx++
  1969. v |= int(b&0x7F) << shift
  1970. if b < 0x80 {
  1971. break
  1972. }
  1973. }
  1974. m.IsCommit = bool(v != 0)
  1975. default:
  1976. iNdEx = preIndex
  1977. skippy, err := skipTypes(dAtA[iNdEx:])
  1978. if err != nil {
  1979. return err
  1980. }
  1981. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1982. return ErrInvalidLengthTypes
  1983. }
  1984. if (iNdEx + skippy) > l {
  1985. return io.ErrUnexpectedEOF
  1986. }
  1987. iNdEx += skippy
  1988. }
  1989. }
  1990. if iNdEx > l {
  1991. return io.ErrUnexpectedEOF
  1992. }
  1993. return nil
  1994. }
  1995. func (m *Proposal) Unmarshal(dAtA []byte) error {
  1996. l := len(dAtA)
  1997. iNdEx := 0
  1998. for iNdEx < l {
  1999. preIndex := iNdEx
  2000. var wire uint64
  2001. for shift := uint(0); ; shift += 7 {
  2002. if shift >= 64 {
  2003. return ErrIntOverflowTypes
  2004. }
  2005. if iNdEx >= l {
  2006. return io.ErrUnexpectedEOF
  2007. }
  2008. b := dAtA[iNdEx]
  2009. iNdEx++
  2010. wire |= uint64(b&0x7F) << shift
  2011. if b < 0x80 {
  2012. break
  2013. }
  2014. }
  2015. fieldNum := int32(wire >> 3)
  2016. wireType := int(wire & 0x7)
  2017. if wireType == 4 {
  2018. return fmt.Errorf("proto: Proposal: wiretype end group for non-group")
  2019. }
  2020. if fieldNum <= 0 {
  2021. return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire)
  2022. }
  2023. switch fieldNum {
  2024. case 1:
  2025. if wireType != 2 {
  2026. return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType)
  2027. }
  2028. var msglen int
  2029. for shift := uint(0); ; shift += 7 {
  2030. if shift >= 64 {
  2031. return ErrIntOverflowTypes
  2032. }
  2033. if iNdEx >= l {
  2034. return io.ErrUnexpectedEOF
  2035. }
  2036. b := dAtA[iNdEx]
  2037. iNdEx++
  2038. msglen |= int(b&0x7F) << shift
  2039. if b < 0x80 {
  2040. break
  2041. }
  2042. }
  2043. if msglen < 0 {
  2044. return ErrInvalidLengthTypes
  2045. }
  2046. postIndex := iNdEx + msglen
  2047. if postIndex < 0 {
  2048. return ErrInvalidLengthTypes
  2049. }
  2050. if postIndex > l {
  2051. return io.ErrUnexpectedEOF
  2052. }
  2053. if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2054. return err
  2055. }
  2056. iNdEx = postIndex
  2057. default:
  2058. iNdEx = preIndex
  2059. skippy, err := skipTypes(dAtA[iNdEx:])
  2060. if err != nil {
  2061. return err
  2062. }
  2063. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2064. return ErrInvalidLengthTypes
  2065. }
  2066. if (iNdEx + skippy) > l {
  2067. return io.ErrUnexpectedEOF
  2068. }
  2069. iNdEx += skippy
  2070. }
  2071. }
  2072. if iNdEx > l {
  2073. return io.ErrUnexpectedEOF
  2074. }
  2075. return nil
  2076. }
  2077. func (m *ProposalPOL) Unmarshal(dAtA []byte) error {
  2078. l := len(dAtA)
  2079. iNdEx := 0
  2080. for iNdEx < l {
  2081. preIndex := iNdEx
  2082. var wire uint64
  2083. for shift := uint(0); ; shift += 7 {
  2084. if shift >= 64 {
  2085. return ErrIntOverflowTypes
  2086. }
  2087. if iNdEx >= l {
  2088. return io.ErrUnexpectedEOF
  2089. }
  2090. b := dAtA[iNdEx]
  2091. iNdEx++
  2092. wire |= uint64(b&0x7F) << shift
  2093. if b < 0x80 {
  2094. break
  2095. }
  2096. }
  2097. fieldNum := int32(wire >> 3)
  2098. wireType := int(wire & 0x7)
  2099. if wireType == 4 {
  2100. return fmt.Errorf("proto: ProposalPOL: wiretype end group for non-group")
  2101. }
  2102. if fieldNum <= 0 {
  2103. return fmt.Errorf("proto: ProposalPOL: illegal tag %d (wire type %d)", fieldNum, wire)
  2104. }
  2105. switch fieldNum {
  2106. case 1:
  2107. if wireType != 0 {
  2108. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2109. }
  2110. m.Height = 0
  2111. for shift := uint(0); ; shift += 7 {
  2112. if shift >= 64 {
  2113. return ErrIntOverflowTypes
  2114. }
  2115. if iNdEx >= l {
  2116. return io.ErrUnexpectedEOF
  2117. }
  2118. b := dAtA[iNdEx]
  2119. iNdEx++
  2120. m.Height |= int64(b&0x7F) << shift
  2121. if b < 0x80 {
  2122. break
  2123. }
  2124. }
  2125. case 2:
  2126. if wireType != 0 {
  2127. return fmt.Errorf("proto: wrong wireType = %d for field ProposalPolRound", wireType)
  2128. }
  2129. m.ProposalPolRound = 0
  2130. for shift := uint(0); ; shift += 7 {
  2131. if shift >= 64 {
  2132. return ErrIntOverflowTypes
  2133. }
  2134. if iNdEx >= l {
  2135. return io.ErrUnexpectedEOF
  2136. }
  2137. b := dAtA[iNdEx]
  2138. iNdEx++
  2139. m.ProposalPolRound |= int32(b&0x7F) << shift
  2140. if b < 0x80 {
  2141. break
  2142. }
  2143. }
  2144. case 3:
  2145. if wireType != 2 {
  2146. return fmt.Errorf("proto: wrong wireType = %d for field ProposalPol", wireType)
  2147. }
  2148. var msglen int
  2149. for shift := uint(0); ; shift += 7 {
  2150. if shift >= 64 {
  2151. return ErrIntOverflowTypes
  2152. }
  2153. if iNdEx >= l {
  2154. return io.ErrUnexpectedEOF
  2155. }
  2156. b := dAtA[iNdEx]
  2157. iNdEx++
  2158. msglen |= int(b&0x7F) << shift
  2159. if b < 0x80 {
  2160. break
  2161. }
  2162. }
  2163. if msglen < 0 {
  2164. return ErrInvalidLengthTypes
  2165. }
  2166. postIndex := iNdEx + msglen
  2167. if postIndex < 0 {
  2168. return ErrInvalidLengthTypes
  2169. }
  2170. if postIndex > l {
  2171. return io.ErrUnexpectedEOF
  2172. }
  2173. if err := m.ProposalPol.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2174. return err
  2175. }
  2176. iNdEx = postIndex
  2177. default:
  2178. iNdEx = preIndex
  2179. skippy, err := skipTypes(dAtA[iNdEx:])
  2180. if err != nil {
  2181. return err
  2182. }
  2183. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2184. return ErrInvalidLengthTypes
  2185. }
  2186. if (iNdEx + skippy) > l {
  2187. return io.ErrUnexpectedEOF
  2188. }
  2189. iNdEx += skippy
  2190. }
  2191. }
  2192. if iNdEx > l {
  2193. return io.ErrUnexpectedEOF
  2194. }
  2195. return nil
  2196. }
  2197. func (m *BlockPart) Unmarshal(dAtA []byte) error {
  2198. l := len(dAtA)
  2199. iNdEx := 0
  2200. for iNdEx < l {
  2201. preIndex := iNdEx
  2202. var wire uint64
  2203. for shift := uint(0); ; shift += 7 {
  2204. if shift >= 64 {
  2205. return ErrIntOverflowTypes
  2206. }
  2207. if iNdEx >= l {
  2208. return io.ErrUnexpectedEOF
  2209. }
  2210. b := dAtA[iNdEx]
  2211. iNdEx++
  2212. wire |= uint64(b&0x7F) << shift
  2213. if b < 0x80 {
  2214. break
  2215. }
  2216. }
  2217. fieldNum := int32(wire >> 3)
  2218. wireType := int(wire & 0x7)
  2219. if wireType == 4 {
  2220. return fmt.Errorf("proto: BlockPart: wiretype end group for non-group")
  2221. }
  2222. if fieldNum <= 0 {
  2223. return fmt.Errorf("proto: BlockPart: illegal tag %d (wire type %d)", fieldNum, wire)
  2224. }
  2225. switch fieldNum {
  2226. case 1:
  2227. if wireType != 0 {
  2228. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2229. }
  2230. m.Height = 0
  2231. for shift := uint(0); ; shift += 7 {
  2232. if shift >= 64 {
  2233. return ErrIntOverflowTypes
  2234. }
  2235. if iNdEx >= l {
  2236. return io.ErrUnexpectedEOF
  2237. }
  2238. b := dAtA[iNdEx]
  2239. iNdEx++
  2240. m.Height |= int64(b&0x7F) << shift
  2241. if b < 0x80 {
  2242. break
  2243. }
  2244. }
  2245. case 2:
  2246. if wireType != 0 {
  2247. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  2248. }
  2249. m.Round = 0
  2250. for shift := uint(0); ; shift += 7 {
  2251. if shift >= 64 {
  2252. return ErrIntOverflowTypes
  2253. }
  2254. if iNdEx >= l {
  2255. return io.ErrUnexpectedEOF
  2256. }
  2257. b := dAtA[iNdEx]
  2258. iNdEx++
  2259. m.Round |= int32(b&0x7F) << shift
  2260. if b < 0x80 {
  2261. break
  2262. }
  2263. }
  2264. case 3:
  2265. if wireType != 2 {
  2266. return fmt.Errorf("proto: wrong wireType = %d for field Part", wireType)
  2267. }
  2268. var msglen int
  2269. for shift := uint(0); ; shift += 7 {
  2270. if shift >= 64 {
  2271. return ErrIntOverflowTypes
  2272. }
  2273. if iNdEx >= l {
  2274. return io.ErrUnexpectedEOF
  2275. }
  2276. b := dAtA[iNdEx]
  2277. iNdEx++
  2278. msglen |= int(b&0x7F) << shift
  2279. if b < 0x80 {
  2280. break
  2281. }
  2282. }
  2283. if msglen < 0 {
  2284. return ErrInvalidLengthTypes
  2285. }
  2286. postIndex := iNdEx + msglen
  2287. if postIndex < 0 {
  2288. return ErrInvalidLengthTypes
  2289. }
  2290. if postIndex > l {
  2291. return io.ErrUnexpectedEOF
  2292. }
  2293. if err := m.Part.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2294. return err
  2295. }
  2296. iNdEx = postIndex
  2297. default:
  2298. iNdEx = preIndex
  2299. skippy, err := skipTypes(dAtA[iNdEx:])
  2300. if err != nil {
  2301. return err
  2302. }
  2303. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2304. return ErrInvalidLengthTypes
  2305. }
  2306. if (iNdEx + skippy) > l {
  2307. return io.ErrUnexpectedEOF
  2308. }
  2309. iNdEx += skippy
  2310. }
  2311. }
  2312. if iNdEx > l {
  2313. return io.ErrUnexpectedEOF
  2314. }
  2315. return nil
  2316. }
  2317. func (m *Vote) Unmarshal(dAtA []byte) error {
  2318. l := len(dAtA)
  2319. iNdEx := 0
  2320. for iNdEx < l {
  2321. preIndex := iNdEx
  2322. var wire uint64
  2323. for shift := uint(0); ; shift += 7 {
  2324. if shift >= 64 {
  2325. return ErrIntOverflowTypes
  2326. }
  2327. if iNdEx >= l {
  2328. return io.ErrUnexpectedEOF
  2329. }
  2330. b := dAtA[iNdEx]
  2331. iNdEx++
  2332. wire |= uint64(b&0x7F) << shift
  2333. if b < 0x80 {
  2334. break
  2335. }
  2336. }
  2337. fieldNum := int32(wire >> 3)
  2338. wireType := int(wire & 0x7)
  2339. if wireType == 4 {
  2340. return fmt.Errorf("proto: Vote: wiretype end group for non-group")
  2341. }
  2342. if fieldNum <= 0 {
  2343. return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire)
  2344. }
  2345. switch fieldNum {
  2346. case 1:
  2347. if wireType != 2 {
  2348. return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType)
  2349. }
  2350. var msglen int
  2351. for shift := uint(0); ; shift += 7 {
  2352. if shift >= 64 {
  2353. return ErrIntOverflowTypes
  2354. }
  2355. if iNdEx >= l {
  2356. return io.ErrUnexpectedEOF
  2357. }
  2358. b := dAtA[iNdEx]
  2359. iNdEx++
  2360. msglen |= int(b&0x7F) << shift
  2361. if b < 0x80 {
  2362. break
  2363. }
  2364. }
  2365. if msglen < 0 {
  2366. return ErrInvalidLengthTypes
  2367. }
  2368. postIndex := iNdEx + msglen
  2369. if postIndex < 0 {
  2370. return ErrInvalidLengthTypes
  2371. }
  2372. if postIndex > l {
  2373. return io.ErrUnexpectedEOF
  2374. }
  2375. if m.Vote == nil {
  2376. m.Vote = &types.Vote{}
  2377. }
  2378. if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2379. return err
  2380. }
  2381. iNdEx = postIndex
  2382. default:
  2383. iNdEx = preIndex
  2384. skippy, err := skipTypes(dAtA[iNdEx:])
  2385. if err != nil {
  2386. return err
  2387. }
  2388. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2389. return ErrInvalidLengthTypes
  2390. }
  2391. if (iNdEx + skippy) > l {
  2392. return io.ErrUnexpectedEOF
  2393. }
  2394. iNdEx += skippy
  2395. }
  2396. }
  2397. if iNdEx > l {
  2398. return io.ErrUnexpectedEOF
  2399. }
  2400. return nil
  2401. }
  2402. func (m *HasVote) Unmarshal(dAtA []byte) error {
  2403. l := len(dAtA)
  2404. iNdEx := 0
  2405. for iNdEx < l {
  2406. preIndex := iNdEx
  2407. var wire uint64
  2408. for shift := uint(0); ; shift += 7 {
  2409. if shift >= 64 {
  2410. return ErrIntOverflowTypes
  2411. }
  2412. if iNdEx >= l {
  2413. return io.ErrUnexpectedEOF
  2414. }
  2415. b := dAtA[iNdEx]
  2416. iNdEx++
  2417. wire |= uint64(b&0x7F) << shift
  2418. if b < 0x80 {
  2419. break
  2420. }
  2421. }
  2422. fieldNum := int32(wire >> 3)
  2423. wireType := int(wire & 0x7)
  2424. if wireType == 4 {
  2425. return fmt.Errorf("proto: HasVote: wiretype end group for non-group")
  2426. }
  2427. if fieldNum <= 0 {
  2428. return fmt.Errorf("proto: HasVote: illegal tag %d (wire type %d)", fieldNum, wire)
  2429. }
  2430. switch fieldNum {
  2431. case 1:
  2432. if wireType != 0 {
  2433. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2434. }
  2435. m.Height = 0
  2436. for shift := uint(0); ; shift += 7 {
  2437. if shift >= 64 {
  2438. return ErrIntOverflowTypes
  2439. }
  2440. if iNdEx >= l {
  2441. return io.ErrUnexpectedEOF
  2442. }
  2443. b := dAtA[iNdEx]
  2444. iNdEx++
  2445. m.Height |= int64(b&0x7F) << shift
  2446. if b < 0x80 {
  2447. break
  2448. }
  2449. }
  2450. case 2:
  2451. if wireType != 0 {
  2452. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  2453. }
  2454. m.Round = 0
  2455. for shift := uint(0); ; shift += 7 {
  2456. if shift >= 64 {
  2457. return ErrIntOverflowTypes
  2458. }
  2459. if iNdEx >= l {
  2460. return io.ErrUnexpectedEOF
  2461. }
  2462. b := dAtA[iNdEx]
  2463. iNdEx++
  2464. m.Round |= int32(b&0x7F) << shift
  2465. if b < 0x80 {
  2466. break
  2467. }
  2468. }
  2469. case 3:
  2470. if wireType != 0 {
  2471. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2472. }
  2473. m.Type = 0
  2474. for shift := uint(0); ; shift += 7 {
  2475. if shift >= 64 {
  2476. return ErrIntOverflowTypes
  2477. }
  2478. if iNdEx >= l {
  2479. return io.ErrUnexpectedEOF
  2480. }
  2481. b := dAtA[iNdEx]
  2482. iNdEx++
  2483. m.Type |= types.SignedMsgType(b&0x7F) << shift
  2484. if b < 0x80 {
  2485. break
  2486. }
  2487. }
  2488. case 4:
  2489. if wireType != 0 {
  2490. return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  2491. }
  2492. m.Index = 0
  2493. for shift := uint(0); ; shift += 7 {
  2494. if shift >= 64 {
  2495. return ErrIntOverflowTypes
  2496. }
  2497. if iNdEx >= l {
  2498. return io.ErrUnexpectedEOF
  2499. }
  2500. b := dAtA[iNdEx]
  2501. iNdEx++
  2502. m.Index |= int32(b&0x7F) << shift
  2503. if b < 0x80 {
  2504. break
  2505. }
  2506. }
  2507. default:
  2508. iNdEx = preIndex
  2509. skippy, err := skipTypes(dAtA[iNdEx:])
  2510. if err != nil {
  2511. return err
  2512. }
  2513. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2514. return ErrInvalidLengthTypes
  2515. }
  2516. if (iNdEx + skippy) > l {
  2517. return io.ErrUnexpectedEOF
  2518. }
  2519. iNdEx += skippy
  2520. }
  2521. }
  2522. if iNdEx > l {
  2523. return io.ErrUnexpectedEOF
  2524. }
  2525. return nil
  2526. }
  2527. func (m *VoteSetMaj23) Unmarshal(dAtA []byte) error {
  2528. l := len(dAtA)
  2529. iNdEx := 0
  2530. for iNdEx < l {
  2531. preIndex := iNdEx
  2532. var wire uint64
  2533. for shift := uint(0); ; shift += 7 {
  2534. if shift >= 64 {
  2535. return ErrIntOverflowTypes
  2536. }
  2537. if iNdEx >= l {
  2538. return io.ErrUnexpectedEOF
  2539. }
  2540. b := dAtA[iNdEx]
  2541. iNdEx++
  2542. wire |= uint64(b&0x7F) << shift
  2543. if b < 0x80 {
  2544. break
  2545. }
  2546. }
  2547. fieldNum := int32(wire >> 3)
  2548. wireType := int(wire & 0x7)
  2549. if wireType == 4 {
  2550. return fmt.Errorf("proto: VoteSetMaj23: wiretype end group for non-group")
  2551. }
  2552. if fieldNum <= 0 {
  2553. return fmt.Errorf("proto: VoteSetMaj23: illegal tag %d (wire type %d)", fieldNum, wire)
  2554. }
  2555. switch fieldNum {
  2556. case 1:
  2557. if wireType != 0 {
  2558. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2559. }
  2560. m.Height = 0
  2561. for shift := uint(0); ; shift += 7 {
  2562. if shift >= 64 {
  2563. return ErrIntOverflowTypes
  2564. }
  2565. if iNdEx >= l {
  2566. return io.ErrUnexpectedEOF
  2567. }
  2568. b := dAtA[iNdEx]
  2569. iNdEx++
  2570. m.Height |= int64(b&0x7F) << shift
  2571. if b < 0x80 {
  2572. break
  2573. }
  2574. }
  2575. case 2:
  2576. if wireType != 0 {
  2577. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  2578. }
  2579. m.Round = 0
  2580. for shift := uint(0); ; shift += 7 {
  2581. if shift >= 64 {
  2582. return ErrIntOverflowTypes
  2583. }
  2584. if iNdEx >= l {
  2585. return io.ErrUnexpectedEOF
  2586. }
  2587. b := dAtA[iNdEx]
  2588. iNdEx++
  2589. m.Round |= int32(b&0x7F) << shift
  2590. if b < 0x80 {
  2591. break
  2592. }
  2593. }
  2594. case 3:
  2595. if wireType != 0 {
  2596. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2597. }
  2598. m.Type = 0
  2599. for shift := uint(0); ; shift += 7 {
  2600. if shift >= 64 {
  2601. return ErrIntOverflowTypes
  2602. }
  2603. if iNdEx >= l {
  2604. return io.ErrUnexpectedEOF
  2605. }
  2606. b := dAtA[iNdEx]
  2607. iNdEx++
  2608. m.Type |= types.SignedMsgType(b&0x7F) << shift
  2609. if b < 0x80 {
  2610. break
  2611. }
  2612. }
  2613. case 4:
  2614. if wireType != 2 {
  2615. return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType)
  2616. }
  2617. var msglen int
  2618. for shift := uint(0); ; shift += 7 {
  2619. if shift >= 64 {
  2620. return ErrIntOverflowTypes
  2621. }
  2622. if iNdEx >= l {
  2623. return io.ErrUnexpectedEOF
  2624. }
  2625. b := dAtA[iNdEx]
  2626. iNdEx++
  2627. msglen |= int(b&0x7F) << shift
  2628. if b < 0x80 {
  2629. break
  2630. }
  2631. }
  2632. if msglen < 0 {
  2633. return ErrInvalidLengthTypes
  2634. }
  2635. postIndex := iNdEx + msglen
  2636. if postIndex < 0 {
  2637. return ErrInvalidLengthTypes
  2638. }
  2639. if postIndex > l {
  2640. return io.ErrUnexpectedEOF
  2641. }
  2642. if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2643. return err
  2644. }
  2645. iNdEx = postIndex
  2646. default:
  2647. iNdEx = preIndex
  2648. skippy, err := skipTypes(dAtA[iNdEx:])
  2649. if err != nil {
  2650. return err
  2651. }
  2652. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2653. return ErrInvalidLengthTypes
  2654. }
  2655. if (iNdEx + skippy) > l {
  2656. return io.ErrUnexpectedEOF
  2657. }
  2658. iNdEx += skippy
  2659. }
  2660. }
  2661. if iNdEx > l {
  2662. return io.ErrUnexpectedEOF
  2663. }
  2664. return nil
  2665. }
  2666. func (m *VoteSetBits) Unmarshal(dAtA []byte) error {
  2667. l := len(dAtA)
  2668. iNdEx := 0
  2669. for iNdEx < l {
  2670. preIndex := iNdEx
  2671. var wire uint64
  2672. for shift := uint(0); ; shift += 7 {
  2673. if shift >= 64 {
  2674. return ErrIntOverflowTypes
  2675. }
  2676. if iNdEx >= l {
  2677. return io.ErrUnexpectedEOF
  2678. }
  2679. b := dAtA[iNdEx]
  2680. iNdEx++
  2681. wire |= uint64(b&0x7F) << shift
  2682. if b < 0x80 {
  2683. break
  2684. }
  2685. }
  2686. fieldNum := int32(wire >> 3)
  2687. wireType := int(wire & 0x7)
  2688. if wireType == 4 {
  2689. return fmt.Errorf("proto: VoteSetBits: wiretype end group for non-group")
  2690. }
  2691. if fieldNum <= 0 {
  2692. return fmt.Errorf("proto: VoteSetBits: illegal tag %d (wire type %d)", fieldNum, wire)
  2693. }
  2694. switch fieldNum {
  2695. case 1:
  2696. if wireType != 0 {
  2697. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2698. }
  2699. m.Height = 0
  2700. for shift := uint(0); ; shift += 7 {
  2701. if shift >= 64 {
  2702. return ErrIntOverflowTypes
  2703. }
  2704. if iNdEx >= l {
  2705. return io.ErrUnexpectedEOF
  2706. }
  2707. b := dAtA[iNdEx]
  2708. iNdEx++
  2709. m.Height |= int64(b&0x7F) << shift
  2710. if b < 0x80 {
  2711. break
  2712. }
  2713. }
  2714. case 2:
  2715. if wireType != 0 {
  2716. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  2717. }
  2718. m.Round = 0
  2719. for shift := uint(0); ; shift += 7 {
  2720. if shift >= 64 {
  2721. return ErrIntOverflowTypes
  2722. }
  2723. if iNdEx >= l {
  2724. return io.ErrUnexpectedEOF
  2725. }
  2726. b := dAtA[iNdEx]
  2727. iNdEx++
  2728. m.Round |= int32(b&0x7F) << shift
  2729. if b < 0x80 {
  2730. break
  2731. }
  2732. }
  2733. case 3:
  2734. if wireType != 0 {
  2735. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2736. }
  2737. m.Type = 0
  2738. for shift := uint(0); ; shift += 7 {
  2739. if shift >= 64 {
  2740. return ErrIntOverflowTypes
  2741. }
  2742. if iNdEx >= l {
  2743. return io.ErrUnexpectedEOF
  2744. }
  2745. b := dAtA[iNdEx]
  2746. iNdEx++
  2747. m.Type |= types.SignedMsgType(b&0x7F) << shift
  2748. if b < 0x80 {
  2749. break
  2750. }
  2751. }
  2752. case 4:
  2753. if wireType != 2 {
  2754. return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType)
  2755. }
  2756. var msglen int
  2757. for shift := uint(0); ; shift += 7 {
  2758. if shift >= 64 {
  2759. return ErrIntOverflowTypes
  2760. }
  2761. if iNdEx >= l {
  2762. return io.ErrUnexpectedEOF
  2763. }
  2764. b := dAtA[iNdEx]
  2765. iNdEx++
  2766. msglen |= int(b&0x7F) << shift
  2767. if b < 0x80 {
  2768. break
  2769. }
  2770. }
  2771. if msglen < 0 {
  2772. return ErrInvalidLengthTypes
  2773. }
  2774. postIndex := iNdEx + msglen
  2775. if postIndex < 0 {
  2776. return ErrInvalidLengthTypes
  2777. }
  2778. if postIndex > l {
  2779. return io.ErrUnexpectedEOF
  2780. }
  2781. if err := m.BlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2782. return err
  2783. }
  2784. iNdEx = postIndex
  2785. case 5:
  2786. if wireType != 2 {
  2787. return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType)
  2788. }
  2789. var msglen int
  2790. for shift := uint(0); ; shift += 7 {
  2791. if shift >= 64 {
  2792. return ErrIntOverflowTypes
  2793. }
  2794. if iNdEx >= l {
  2795. return io.ErrUnexpectedEOF
  2796. }
  2797. b := dAtA[iNdEx]
  2798. iNdEx++
  2799. msglen |= int(b&0x7F) << shift
  2800. if b < 0x80 {
  2801. break
  2802. }
  2803. }
  2804. if msglen < 0 {
  2805. return ErrInvalidLengthTypes
  2806. }
  2807. postIndex := iNdEx + msglen
  2808. if postIndex < 0 {
  2809. return ErrInvalidLengthTypes
  2810. }
  2811. if postIndex > l {
  2812. return io.ErrUnexpectedEOF
  2813. }
  2814. if err := m.Votes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2815. return err
  2816. }
  2817. iNdEx = postIndex
  2818. default:
  2819. iNdEx = preIndex
  2820. skippy, err := skipTypes(dAtA[iNdEx:])
  2821. if err != nil {
  2822. return err
  2823. }
  2824. if (skippy < 0) || (iNdEx+skippy) < 0 {
  2825. return ErrInvalidLengthTypes
  2826. }
  2827. if (iNdEx + skippy) > l {
  2828. return io.ErrUnexpectedEOF
  2829. }
  2830. iNdEx += skippy
  2831. }
  2832. }
  2833. if iNdEx > l {
  2834. return io.ErrUnexpectedEOF
  2835. }
  2836. return nil
  2837. }
  2838. func (m *Message) Unmarshal(dAtA []byte) error {
  2839. l := len(dAtA)
  2840. iNdEx := 0
  2841. for iNdEx < l {
  2842. preIndex := iNdEx
  2843. var wire uint64
  2844. for shift := uint(0); ; shift += 7 {
  2845. if shift >= 64 {
  2846. return ErrIntOverflowTypes
  2847. }
  2848. if iNdEx >= l {
  2849. return io.ErrUnexpectedEOF
  2850. }
  2851. b := dAtA[iNdEx]
  2852. iNdEx++
  2853. wire |= uint64(b&0x7F) << shift
  2854. if b < 0x80 {
  2855. break
  2856. }
  2857. }
  2858. fieldNum := int32(wire >> 3)
  2859. wireType := int(wire & 0x7)
  2860. if wireType == 4 {
  2861. return fmt.Errorf("proto: Message: wiretype end group for non-group")
  2862. }
  2863. if fieldNum <= 0 {
  2864. return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
  2865. }
  2866. switch fieldNum {
  2867. case 1:
  2868. if wireType != 2 {
  2869. return fmt.Errorf("proto: wrong wireType = %d for field NewRoundStep", wireType)
  2870. }
  2871. var msglen int
  2872. for shift := uint(0); ; shift += 7 {
  2873. if shift >= 64 {
  2874. return ErrIntOverflowTypes
  2875. }
  2876. if iNdEx >= l {
  2877. return io.ErrUnexpectedEOF
  2878. }
  2879. b := dAtA[iNdEx]
  2880. iNdEx++
  2881. msglen |= int(b&0x7F) << shift
  2882. if b < 0x80 {
  2883. break
  2884. }
  2885. }
  2886. if msglen < 0 {
  2887. return ErrInvalidLengthTypes
  2888. }
  2889. postIndex := iNdEx + msglen
  2890. if postIndex < 0 {
  2891. return ErrInvalidLengthTypes
  2892. }
  2893. if postIndex > l {
  2894. return io.ErrUnexpectedEOF
  2895. }
  2896. v := &NewRoundStep{}
  2897. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2898. return err
  2899. }
  2900. m.Sum = &Message_NewRoundStep{v}
  2901. iNdEx = postIndex
  2902. case 2:
  2903. if wireType != 2 {
  2904. return fmt.Errorf("proto: wrong wireType = %d for field NewValidBlock", wireType)
  2905. }
  2906. var msglen int
  2907. for shift := uint(0); ; shift += 7 {
  2908. if shift >= 64 {
  2909. return ErrIntOverflowTypes
  2910. }
  2911. if iNdEx >= l {
  2912. return io.ErrUnexpectedEOF
  2913. }
  2914. b := dAtA[iNdEx]
  2915. iNdEx++
  2916. msglen |= int(b&0x7F) << shift
  2917. if b < 0x80 {
  2918. break
  2919. }
  2920. }
  2921. if msglen < 0 {
  2922. return ErrInvalidLengthTypes
  2923. }
  2924. postIndex := iNdEx + msglen
  2925. if postIndex < 0 {
  2926. return ErrInvalidLengthTypes
  2927. }
  2928. if postIndex > l {
  2929. return io.ErrUnexpectedEOF
  2930. }
  2931. v := &NewValidBlock{}
  2932. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2933. return err
  2934. }
  2935. m.Sum = &Message_NewValidBlock{v}
  2936. iNdEx = postIndex
  2937. case 3:
  2938. if wireType != 2 {
  2939. return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType)
  2940. }
  2941. var msglen int
  2942. for shift := uint(0); ; shift += 7 {
  2943. if shift >= 64 {
  2944. return ErrIntOverflowTypes
  2945. }
  2946. if iNdEx >= l {
  2947. return io.ErrUnexpectedEOF
  2948. }
  2949. b := dAtA[iNdEx]
  2950. iNdEx++
  2951. msglen |= int(b&0x7F) << shift
  2952. if b < 0x80 {
  2953. break
  2954. }
  2955. }
  2956. if msglen < 0 {
  2957. return ErrInvalidLengthTypes
  2958. }
  2959. postIndex := iNdEx + msglen
  2960. if postIndex < 0 {
  2961. return ErrInvalidLengthTypes
  2962. }
  2963. if postIndex > l {
  2964. return io.ErrUnexpectedEOF
  2965. }
  2966. v := &Proposal{}
  2967. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2968. return err
  2969. }
  2970. m.Sum = &Message_Proposal{v}
  2971. iNdEx = postIndex
  2972. case 4:
  2973. if wireType != 2 {
  2974. return fmt.Errorf("proto: wrong wireType = %d for field ProposalPol", wireType)
  2975. }
  2976. var msglen int
  2977. for shift := uint(0); ; shift += 7 {
  2978. if shift >= 64 {
  2979. return ErrIntOverflowTypes
  2980. }
  2981. if iNdEx >= l {
  2982. return io.ErrUnexpectedEOF
  2983. }
  2984. b := dAtA[iNdEx]
  2985. iNdEx++
  2986. msglen |= int(b&0x7F) << shift
  2987. if b < 0x80 {
  2988. break
  2989. }
  2990. }
  2991. if msglen < 0 {
  2992. return ErrInvalidLengthTypes
  2993. }
  2994. postIndex := iNdEx + msglen
  2995. if postIndex < 0 {
  2996. return ErrInvalidLengthTypes
  2997. }
  2998. if postIndex > l {
  2999. return io.ErrUnexpectedEOF
  3000. }
  3001. v := &ProposalPOL{}
  3002. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3003. return err
  3004. }
  3005. m.Sum = &Message_ProposalPol{v}
  3006. iNdEx = postIndex
  3007. case 5:
  3008. if wireType != 2 {
  3009. return fmt.Errorf("proto: wrong wireType = %d for field BlockPart", wireType)
  3010. }
  3011. var msglen int
  3012. for shift := uint(0); ; shift += 7 {
  3013. if shift >= 64 {
  3014. return ErrIntOverflowTypes
  3015. }
  3016. if iNdEx >= l {
  3017. return io.ErrUnexpectedEOF
  3018. }
  3019. b := dAtA[iNdEx]
  3020. iNdEx++
  3021. msglen |= int(b&0x7F) << shift
  3022. if b < 0x80 {
  3023. break
  3024. }
  3025. }
  3026. if msglen < 0 {
  3027. return ErrInvalidLengthTypes
  3028. }
  3029. postIndex := iNdEx + msglen
  3030. if postIndex < 0 {
  3031. return ErrInvalidLengthTypes
  3032. }
  3033. if postIndex > l {
  3034. return io.ErrUnexpectedEOF
  3035. }
  3036. v := &BlockPart{}
  3037. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3038. return err
  3039. }
  3040. m.Sum = &Message_BlockPart{v}
  3041. iNdEx = postIndex
  3042. case 6:
  3043. if wireType != 2 {
  3044. return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType)
  3045. }
  3046. var msglen int
  3047. for shift := uint(0); ; shift += 7 {
  3048. if shift >= 64 {
  3049. return ErrIntOverflowTypes
  3050. }
  3051. if iNdEx >= l {
  3052. return io.ErrUnexpectedEOF
  3053. }
  3054. b := dAtA[iNdEx]
  3055. iNdEx++
  3056. msglen |= int(b&0x7F) << shift
  3057. if b < 0x80 {
  3058. break
  3059. }
  3060. }
  3061. if msglen < 0 {
  3062. return ErrInvalidLengthTypes
  3063. }
  3064. postIndex := iNdEx + msglen
  3065. if postIndex < 0 {
  3066. return ErrInvalidLengthTypes
  3067. }
  3068. if postIndex > l {
  3069. return io.ErrUnexpectedEOF
  3070. }
  3071. v := &Vote{}
  3072. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3073. return err
  3074. }
  3075. m.Sum = &Message_Vote{v}
  3076. iNdEx = postIndex
  3077. case 7:
  3078. if wireType != 2 {
  3079. return fmt.Errorf("proto: wrong wireType = %d for field HasVote", wireType)
  3080. }
  3081. var msglen int
  3082. for shift := uint(0); ; shift += 7 {
  3083. if shift >= 64 {
  3084. return ErrIntOverflowTypes
  3085. }
  3086. if iNdEx >= l {
  3087. return io.ErrUnexpectedEOF
  3088. }
  3089. b := dAtA[iNdEx]
  3090. iNdEx++
  3091. msglen |= int(b&0x7F) << shift
  3092. if b < 0x80 {
  3093. break
  3094. }
  3095. }
  3096. if msglen < 0 {
  3097. return ErrInvalidLengthTypes
  3098. }
  3099. postIndex := iNdEx + msglen
  3100. if postIndex < 0 {
  3101. return ErrInvalidLengthTypes
  3102. }
  3103. if postIndex > l {
  3104. return io.ErrUnexpectedEOF
  3105. }
  3106. v := &HasVote{}
  3107. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3108. return err
  3109. }
  3110. m.Sum = &Message_HasVote{v}
  3111. iNdEx = postIndex
  3112. case 8:
  3113. if wireType != 2 {
  3114. return fmt.Errorf("proto: wrong wireType = %d for field VoteSetMaj23", wireType)
  3115. }
  3116. var msglen int
  3117. for shift := uint(0); ; shift += 7 {
  3118. if shift >= 64 {
  3119. return ErrIntOverflowTypes
  3120. }
  3121. if iNdEx >= l {
  3122. return io.ErrUnexpectedEOF
  3123. }
  3124. b := dAtA[iNdEx]
  3125. iNdEx++
  3126. msglen |= int(b&0x7F) << shift
  3127. if b < 0x80 {
  3128. break
  3129. }
  3130. }
  3131. if msglen < 0 {
  3132. return ErrInvalidLengthTypes
  3133. }
  3134. postIndex := iNdEx + msglen
  3135. if postIndex < 0 {
  3136. return ErrInvalidLengthTypes
  3137. }
  3138. if postIndex > l {
  3139. return io.ErrUnexpectedEOF
  3140. }
  3141. v := &VoteSetMaj23{}
  3142. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3143. return err
  3144. }
  3145. m.Sum = &Message_VoteSetMaj23{v}
  3146. iNdEx = postIndex
  3147. case 9:
  3148. if wireType != 2 {
  3149. return fmt.Errorf("proto: wrong wireType = %d for field VoteSetBits", wireType)
  3150. }
  3151. var msglen int
  3152. for shift := uint(0); ; shift += 7 {
  3153. if shift >= 64 {
  3154. return ErrIntOverflowTypes
  3155. }
  3156. if iNdEx >= l {
  3157. return io.ErrUnexpectedEOF
  3158. }
  3159. b := dAtA[iNdEx]
  3160. iNdEx++
  3161. msglen |= int(b&0x7F) << shift
  3162. if b < 0x80 {
  3163. break
  3164. }
  3165. }
  3166. if msglen < 0 {
  3167. return ErrInvalidLengthTypes
  3168. }
  3169. postIndex := iNdEx + msglen
  3170. if postIndex < 0 {
  3171. return ErrInvalidLengthTypes
  3172. }
  3173. if postIndex > l {
  3174. return io.ErrUnexpectedEOF
  3175. }
  3176. v := &VoteSetBits{}
  3177. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3178. return err
  3179. }
  3180. m.Sum = &Message_VoteSetBits{v}
  3181. iNdEx = postIndex
  3182. default:
  3183. iNdEx = preIndex
  3184. skippy, err := skipTypes(dAtA[iNdEx:])
  3185. if err != nil {
  3186. return err
  3187. }
  3188. if (skippy < 0) || (iNdEx+skippy) < 0 {
  3189. return ErrInvalidLengthTypes
  3190. }
  3191. if (iNdEx + skippy) > l {
  3192. return io.ErrUnexpectedEOF
  3193. }
  3194. iNdEx += skippy
  3195. }
  3196. }
  3197. if iNdEx > l {
  3198. return io.ErrUnexpectedEOF
  3199. }
  3200. return nil
  3201. }
  3202. func skipTypes(dAtA []byte) (n int, err error) {
  3203. l := len(dAtA)
  3204. iNdEx := 0
  3205. depth := 0
  3206. for iNdEx < l {
  3207. var wire uint64
  3208. for shift := uint(0); ; shift += 7 {
  3209. if shift >= 64 {
  3210. return 0, ErrIntOverflowTypes
  3211. }
  3212. if iNdEx >= l {
  3213. return 0, io.ErrUnexpectedEOF
  3214. }
  3215. b := dAtA[iNdEx]
  3216. iNdEx++
  3217. wire |= (uint64(b) & 0x7F) << shift
  3218. if b < 0x80 {
  3219. break
  3220. }
  3221. }
  3222. wireType := int(wire & 0x7)
  3223. switch wireType {
  3224. case 0:
  3225. for shift := uint(0); ; shift += 7 {
  3226. if shift >= 64 {
  3227. return 0, ErrIntOverflowTypes
  3228. }
  3229. if iNdEx >= l {
  3230. return 0, io.ErrUnexpectedEOF
  3231. }
  3232. iNdEx++
  3233. if dAtA[iNdEx-1] < 0x80 {
  3234. break
  3235. }
  3236. }
  3237. case 1:
  3238. iNdEx += 8
  3239. case 2:
  3240. var length int
  3241. for shift := uint(0); ; shift += 7 {
  3242. if shift >= 64 {
  3243. return 0, ErrIntOverflowTypes
  3244. }
  3245. if iNdEx >= l {
  3246. return 0, io.ErrUnexpectedEOF
  3247. }
  3248. b := dAtA[iNdEx]
  3249. iNdEx++
  3250. length |= (int(b) & 0x7F) << shift
  3251. if b < 0x80 {
  3252. break
  3253. }
  3254. }
  3255. if length < 0 {
  3256. return 0, ErrInvalidLengthTypes
  3257. }
  3258. iNdEx += length
  3259. case 3:
  3260. depth++
  3261. case 4:
  3262. if depth == 0 {
  3263. return 0, ErrUnexpectedEndOfGroupTypes
  3264. }
  3265. depth--
  3266. case 5:
  3267. iNdEx += 4
  3268. default:
  3269. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  3270. }
  3271. if iNdEx < 0 {
  3272. return 0, ErrInvalidLengthTypes
  3273. }
  3274. if depth == 0 {
  3275. return iNdEx, nil
  3276. }
  3277. }
  3278. return 0, io.ErrUnexpectedEOF
  3279. }
  3280. var (
  3281. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  3282. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  3283. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  3284. )