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.

3455 lines
79 KiB

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