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.

588 lines
14 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: proto/evidence/msgs.proto
  3. package evidence
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. types "github.com/tendermint/tendermint/proto/types"
  9. io "io"
  10. math "math"
  11. math_bits "math/bits"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  22. type List struct {
  23. Evidence []*types.Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"`
  24. }
  25. func (m *List) Reset() { *m = List{} }
  26. func (m *List) String() string { return proto.CompactTextString(m) }
  27. func (*List) ProtoMessage() {}
  28. func (*List) Descriptor() ([]byte, []int) {
  29. return fileDescriptor_df8322769b0bd7d6, []int{0}
  30. }
  31. func (m *List) XXX_Unmarshal(b []byte) error {
  32. return m.Unmarshal(b)
  33. }
  34. func (m *List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  35. if deterministic {
  36. return xxx_messageInfo_List.Marshal(b, m, deterministic)
  37. } else {
  38. b = b[:cap(b)]
  39. n, err := m.MarshalToSizedBuffer(b)
  40. if err != nil {
  41. return nil, err
  42. }
  43. return b[:n], nil
  44. }
  45. }
  46. func (m *List) XXX_Merge(src proto.Message) {
  47. xxx_messageInfo_List.Merge(m, src)
  48. }
  49. func (m *List) XXX_Size() int {
  50. return m.Size()
  51. }
  52. func (m *List) XXX_DiscardUnknown() {
  53. xxx_messageInfo_List.DiscardUnknown(m)
  54. }
  55. var xxx_messageInfo_List proto.InternalMessageInfo
  56. func (m *List) GetEvidence() []*types.Evidence {
  57. if m != nil {
  58. return m.Evidence
  59. }
  60. return nil
  61. }
  62. type Info struct {
  63. Committed bool `protobuf:"varint,1,opt,name=committed,proto3" json:"committed,omitempty"`
  64. Priority int64 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
  65. Evidence types.Evidence `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"`
  66. }
  67. func (m *Info) Reset() { *m = Info{} }
  68. func (m *Info) String() string { return proto.CompactTextString(m) }
  69. func (*Info) ProtoMessage() {}
  70. func (*Info) Descriptor() ([]byte, []int) {
  71. return fileDescriptor_df8322769b0bd7d6, []int{1}
  72. }
  73. func (m *Info) XXX_Unmarshal(b []byte) error {
  74. return m.Unmarshal(b)
  75. }
  76. func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  77. if deterministic {
  78. return xxx_messageInfo_Info.Marshal(b, m, deterministic)
  79. } else {
  80. b = b[:cap(b)]
  81. n, err := m.MarshalToSizedBuffer(b)
  82. if err != nil {
  83. return nil, err
  84. }
  85. return b[:n], nil
  86. }
  87. }
  88. func (m *Info) XXX_Merge(src proto.Message) {
  89. xxx_messageInfo_Info.Merge(m, src)
  90. }
  91. func (m *Info) XXX_Size() int {
  92. return m.Size()
  93. }
  94. func (m *Info) XXX_DiscardUnknown() {
  95. xxx_messageInfo_Info.DiscardUnknown(m)
  96. }
  97. var xxx_messageInfo_Info proto.InternalMessageInfo
  98. func (m *Info) GetCommitted() bool {
  99. if m != nil {
  100. return m.Committed
  101. }
  102. return false
  103. }
  104. func (m *Info) GetPriority() int64 {
  105. if m != nil {
  106. return m.Priority
  107. }
  108. return 0
  109. }
  110. func (m *Info) GetEvidence() types.Evidence {
  111. if m != nil {
  112. return m.Evidence
  113. }
  114. return types.Evidence{}
  115. }
  116. func init() {
  117. proto.RegisterType((*List)(nil), "tendermint.proto.evidence.List")
  118. proto.RegisterType((*Info)(nil), "tendermint.proto.evidence.Info")
  119. }
  120. func init() { proto.RegisterFile("proto/evidence/msgs.proto", fileDescriptor_df8322769b0bd7d6) }
  121. var fileDescriptor_df8322769b0bd7d6 = []byte{
  122. // 258 bytes of a gzipped FileDescriptorProto
  123. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0x28, 0xca, 0x2f,
  124. 0xc9, 0xd7, 0x4f, 0x2d, 0xcb, 0x4c, 0x49, 0xcd, 0x4b, 0x4e, 0xd5, 0xcf, 0x2d, 0x4e, 0x2f, 0xd6,
  125. 0x03, 0x8b, 0x09, 0x49, 0x96, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x40, 0x44,
  126. 0xf4, 0x60, 0xaa, 0xa4, 0xd4, 0x4a, 0x32, 0x32, 0x8b, 0x52, 0xe2, 0x0b, 0x12, 0x8b, 0x4a, 0x2a,
  127. 0xf5, 0x21, 0x26, 0xa4, 0xe7, 0xa7, 0xe7, 0x23, 0x58, 0x10, 0x0d, 0x52, 0x52, 0x10, 0x91, 0x92,
  128. 0xca, 0x82, 0xd4, 0x62, 0xb8, 0x1d, 0x10, 0x39, 0x25, 0x17, 0x2e, 0x16, 0x9f, 0xcc, 0xe2, 0x12,
  129. 0x21, 0x1b, 0x2e, 0x0e, 0x98, 0x8c, 0x04, 0xa3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x82, 0x1e, 0x86,
  130. 0xcd, 0x60, 0x13, 0xf4, 0x5c, 0xa1, 0xea, 0x82, 0xe0, 0x3a, 0x94, 0x5a, 0x18, 0xb9, 0x58, 0x3c,
  131. 0xf3, 0xd2, 0xf2, 0x85, 0x64, 0xb8, 0x38, 0x93, 0xf3, 0x73, 0x73, 0x33, 0x4b, 0x4a, 0x52, 0x53,
  132. 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x82, 0x10, 0x02, 0x42, 0x52, 0x5c, 0x1c, 0x05, 0x45, 0x99,
  133. 0xf9, 0x45, 0x99, 0x25, 0x95, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x70, 0xbe, 0x90, 0x13,
  134. 0x92, 0x03, 0x98, 0x15, 0x18, 0x89, 0x71, 0x80, 0x13, 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x08, 0x67,
  135. 0x38, 0x79, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13,
  136. 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x7e, 0x7a, 0x66,
  137. 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc2, 0x54, 0x64, 0x26, 0x6a, 0x0c, 0x24,
  138. 0xb1, 0x81, 0xf9, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0x46, 0xba, 0xe0, 0x9a, 0x01,
  139. 0x00, 0x00,
  140. }
  141. func (m *List) Marshal() (dAtA []byte, err error) {
  142. size := m.Size()
  143. dAtA = make([]byte, size)
  144. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  145. if err != nil {
  146. return nil, err
  147. }
  148. return dAtA[:n], nil
  149. }
  150. func (m *List) MarshalTo(dAtA []byte) (int, error) {
  151. size := m.Size()
  152. return m.MarshalToSizedBuffer(dAtA[:size])
  153. }
  154. func (m *List) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  155. i := len(dAtA)
  156. _ = i
  157. var l int
  158. _ = l
  159. if len(m.Evidence) > 0 {
  160. for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- {
  161. {
  162. size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  163. if err != nil {
  164. return 0, err
  165. }
  166. i -= size
  167. i = encodeVarintMsgs(dAtA, i, uint64(size))
  168. }
  169. i--
  170. dAtA[i] = 0xa
  171. }
  172. }
  173. return len(dAtA) - i, nil
  174. }
  175. func (m *Info) Marshal() (dAtA []byte, err error) {
  176. size := m.Size()
  177. dAtA = make([]byte, size)
  178. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  179. if err != nil {
  180. return nil, err
  181. }
  182. return dAtA[:n], nil
  183. }
  184. func (m *Info) MarshalTo(dAtA []byte) (int, error) {
  185. size := m.Size()
  186. return m.MarshalToSizedBuffer(dAtA[:size])
  187. }
  188. func (m *Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  189. i := len(dAtA)
  190. _ = i
  191. var l int
  192. _ = l
  193. {
  194. size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
  195. if err != nil {
  196. return 0, err
  197. }
  198. i -= size
  199. i = encodeVarintMsgs(dAtA, i, uint64(size))
  200. }
  201. i--
  202. dAtA[i] = 0x1a
  203. if m.Priority != 0 {
  204. i = encodeVarintMsgs(dAtA, i, uint64(m.Priority))
  205. i--
  206. dAtA[i] = 0x10
  207. }
  208. if m.Committed {
  209. i--
  210. if m.Committed {
  211. dAtA[i] = 1
  212. } else {
  213. dAtA[i] = 0
  214. }
  215. i--
  216. dAtA[i] = 0x8
  217. }
  218. return len(dAtA) - i, nil
  219. }
  220. func encodeVarintMsgs(dAtA []byte, offset int, v uint64) int {
  221. offset -= sovMsgs(v)
  222. base := offset
  223. for v >= 1<<7 {
  224. dAtA[offset] = uint8(v&0x7f | 0x80)
  225. v >>= 7
  226. offset++
  227. }
  228. dAtA[offset] = uint8(v)
  229. return base
  230. }
  231. func (m *List) Size() (n int) {
  232. if m == nil {
  233. return 0
  234. }
  235. var l int
  236. _ = l
  237. if len(m.Evidence) > 0 {
  238. for _, e := range m.Evidence {
  239. l = e.Size()
  240. n += 1 + l + sovMsgs(uint64(l))
  241. }
  242. }
  243. return n
  244. }
  245. func (m *Info) Size() (n int) {
  246. if m == nil {
  247. return 0
  248. }
  249. var l int
  250. _ = l
  251. if m.Committed {
  252. n += 2
  253. }
  254. if m.Priority != 0 {
  255. n += 1 + sovMsgs(uint64(m.Priority))
  256. }
  257. l = m.Evidence.Size()
  258. n += 1 + l + sovMsgs(uint64(l))
  259. return n
  260. }
  261. func sovMsgs(x uint64) (n int) {
  262. return (math_bits.Len64(x|1) + 6) / 7
  263. }
  264. func sozMsgs(x uint64) (n int) {
  265. return sovMsgs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  266. }
  267. func (m *List) Unmarshal(dAtA []byte) error {
  268. l := len(dAtA)
  269. iNdEx := 0
  270. for iNdEx < l {
  271. preIndex := iNdEx
  272. var wire uint64
  273. for shift := uint(0); ; shift += 7 {
  274. if shift >= 64 {
  275. return ErrIntOverflowMsgs
  276. }
  277. if iNdEx >= l {
  278. return io.ErrUnexpectedEOF
  279. }
  280. b := dAtA[iNdEx]
  281. iNdEx++
  282. wire |= uint64(b&0x7F) << shift
  283. if b < 0x80 {
  284. break
  285. }
  286. }
  287. fieldNum := int32(wire >> 3)
  288. wireType := int(wire & 0x7)
  289. if wireType == 4 {
  290. return fmt.Errorf("proto: List: wiretype end group for non-group")
  291. }
  292. if fieldNum <= 0 {
  293. return fmt.Errorf("proto: List: illegal tag %d (wire type %d)", fieldNum, wire)
  294. }
  295. switch fieldNum {
  296. case 1:
  297. if wireType != 2 {
  298. return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
  299. }
  300. var msglen int
  301. for shift := uint(0); ; shift += 7 {
  302. if shift >= 64 {
  303. return ErrIntOverflowMsgs
  304. }
  305. if iNdEx >= l {
  306. return io.ErrUnexpectedEOF
  307. }
  308. b := dAtA[iNdEx]
  309. iNdEx++
  310. msglen |= int(b&0x7F) << shift
  311. if b < 0x80 {
  312. break
  313. }
  314. }
  315. if msglen < 0 {
  316. return ErrInvalidLengthMsgs
  317. }
  318. postIndex := iNdEx + msglen
  319. if postIndex < 0 {
  320. return ErrInvalidLengthMsgs
  321. }
  322. if postIndex > l {
  323. return io.ErrUnexpectedEOF
  324. }
  325. m.Evidence = append(m.Evidence, &types.Evidence{})
  326. if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  327. return err
  328. }
  329. iNdEx = postIndex
  330. default:
  331. iNdEx = preIndex
  332. skippy, err := skipMsgs(dAtA[iNdEx:])
  333. if err != nil {
  334. return err
  335. }
  336. if skippy < 0 {
  337. return ErrInvalidLengthMsgs
  338. }
  339. if (iNdEx + skippy) < 0 {
  340. return ErrInvalidLengthMsgs
  341. }
  342. if (iNdEx + skippy) > l {
  343. return io.ErrUnexpectedEOF
  344. }
  345. iNdEx += skippy
  346. }
  347. }
  348. if iNdEx > l {
  349. return io.ErrUnexpectedEOF
  350. }
  351. return nil
  352. }
  353. func (m *Info) Unmarshal(dAtA []byte) error {
  354. l := len(dAtA)
  355. iNdEx := 0
  356. for iNdEx < l {
  357. preIndex := iNdEx
  358. var wire uint64
  359. for shift := uint(0); ; shift += 7 {
  360. if shift >= 64 {
  361. return ErrIntOverflowMsgs
  362. }
  363. if iNdEx >= l {
  364. return io.ErrUnexpectedEOF
  365. }
  366. b := dAtA[iNdEx]
  367. iNdEx++
  368. wire |= uint64(b&0x7F) << shift
  369. if b < 0x80 {
  370. break
  371. }
  372. }
  373. fieldNum := int32(wire >> 3)
  374. wireType := int(wire & 0x7)
  375. if wireType == 4 {
  376. return fmt.Errorf("proto: Info: wiretype end group for non-group")
  377. }
  378. if fieldNum <= 0 {
  379. return fmt.Errorf("proto: Info: illegal tag %d (wire type %d)", fieldNum, wire)
  380. }
  381. switch fieldNum {
  382. case 1:
  383. if wireType != 0 {
  384. return fmt.Errorf("proto: wrong wireType = %d for field Committed", wireType)
  385. }
  386. var v int
  387. for shift := uint(0); ; shift += 7 {
  388. if shift >= 64 {
  389. return ErrIntOverflowMsgs
  390. }
  391. if iNdEx >= l {
  392. return io.ErrUnexpectedEOF
  393. }
  394. b := dAtA[iNdEx]
  395. iNdEx++
  396. v |= int(b&0x7F) << shift
  397. if b < 0x80 {
  398. break
  399. }
  400. }
  401. m.Committed = bool(v != 0)
  402. case 2:
  403. if wireType != 0 {
  404. return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType)
  405. }
  406. m.Priority = 0
  407. for shift := uint(0); ; shift += 7 {
  408. if shift >= 64 {
  409. return ErrIntOverflowMsgs
  410. }
  411. if iNdEx >= l {
  412. return io.ErrUnexpectedEOF
  413. }
  414. b := dAtA[iNdEx]
  415. iNdEx++
  416. m.Priority |= int64(b&0x7F) << shift
  417. if b < 0x80 {
  418. break
  419. }
  420. }
  421. case 3:
  422. if wireType != 2 {
  423. return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
  424. }
  425. var msglen int
  426. for shift := uint(0); ; shift += 7 {
  427. if shift >= 64 {
  428. return ErrIntOverflowMsgs
  429. }
  430. if iNdEx >= l {
  431. return io.ErrUnexpectedEOF
  432. }
  433. b := dAtA[iNdEx]
  434. iNdEx++
  435. msglen |= int(b&0x7F) << shift
  436. if b < 0x80 {
  437. break
  438. }
  439. }
  440. if msglen < 0 {
  441. return ErrInvalidLengthMsgs
  442. }
  443. postIndex := iNdEx + msglen
  444. if postIndex < 0 {
  445. return ErrInvalidLengthMsgs
  446. }
  447. if postIndex > l {
  448. return io.ErrUnexpectedEOF
  449. }
  450. if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  451. return err
  452. }
  453. iNdEx = postIndex
  454. default:
  455. iNdEx = preIndex
  456. skippy, err := skipMsgs(dAtA[iNdEx:])
  457. if err != nil {
  458. return err
  459. }
  460. if skippy < 0 {
  461. return ErrInvalidLengthMsgs
  462. }
  463. if (iNdEx + skippy) < 0 {
  464. return ErrInvalidLengthMsgs
  465. }
  466. if (iNdEx + skippy) > l {
  467. return io.ErrUnexpectedEOF
  468. }
  469. iNdEx += skippy
  470. }
  471. }
  472. if iNdEx > l {
  473. return io.ErrUnexpectedEOF
  474. }
  475. return nil
  476. }
  477. func skipMsgs(dAtA []byte) (n int, err error) {
  478. l := len(dAtA)
  479. iNdEx := 0
  480. depth := 0
  481. for iNdEx < l {
  482. var wire uint64
  483. for shift := uint(0); ; shift += 7 {
  484. if shift >= 64 {
  485. return 0, ErrIntOverflowMsgs
  486. }
  487. if iNdEx >= l {
  488. return 0, io.ErrUnexpectedEOF
  489. }
  490. b := dAtA[iNdEx]
  491. iNdEx++
  492. wire |= (uint64(b) & 0x7F) << shift
  493. if b < 0x80 {
  494. break
  495. }
  496. }
  497. wireType := int(wire & 0x7)
  498. switch wireType {
  499. case 0:
  500. for shift := uint(0); ; shift += 7 {
  501. if shift >= 64 {
  502. return 0, ErrIntOverflowMsgs
  503. }
  504. if iNdEx >= l {
  505. return 0, io.ErrUnexpectedEOF
  506. }
  507. iNdEx++
  508. if dAtA[iNdEx-1] < 0x80 {
  509. break
  510. }
  511. }
  512. case 1:
  513. iNdEx += 8
  514. case 2:
  515. var length int
  516. for shift := uint(0); ; shift += 7 {
  517. if shift >= 64 {
  518. return 0, ErrIntOverflowMsgs
  519. }
  520. if iNdEx >= l {
  521. return 0, io.ErrUnexpectedEOF
  522. }
  523. b := dAtA[iNdEx]
  524. iNdEx++
  525. length |= (int(b) & 0x7F) << shift
  526. if b < 0x80 {
  527. break
  528. }
  529. }
  530. if length < 0 {
  531. return 0, ErrInvalidLengthMsgs
  532. }
  533. iNdEx += length
  534. case 3:
  535. depth++
  536. case 4:
  537. if depth == 0 {
  538. return 0, ErrUnexpectedEndOfGroupMsgs
  539. }
  540. depth--
  541. case 5:
  542. iNdEx += 4
  543. default:
  544. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  545. }
  546. if iNdEx < 0 {
  547. return 0, ErrInvalidLengthMsgs
  548. }
  549. if depth == 0 {
  550. return iNdEx, nil
  551. }
  552. }
  553. return 0, io.ErrUnexpectedEOF
  554. }
  555. var (
  556. ErrInvalidLengthMsgs = fmt.Errorf("proto: negative length found during unmarshaling")
  557. ErrIntOverflowMsgs = fmt.Errorf("proto: integer overflow")
  558. ErrUnexpectedEndOfGroupMsgs = fmt.Errorf("proto: unexpected end of group")
  559. )