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.

587 lines
13 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.evidence.List")
  118. proto.RegisterType((*Info)(nil), "tendermint.evidence.Info")
  119. }
  120. func init() { proto.RegisterFile("proto/evidence/msgs.proto", fileDescriptor_df8322769b0bd7d6) }
  121. var fileDescriptor_df8322769b0bd7d6 = []byte{
  122. // 254 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, 0x09, 0x97, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0xe8, 0xc1,
  126. 0xe4, 0xa5, 0xd4, 0x4a, 0x32, 0x32, 0x8b, 0x52, 0xe2, 0x0b, 0x12, 0x8b, 0x4a, 0x2a, 0xf5, 0x21,
  127. 0x7a, 0xd3, 0xf3, 0xd3, 0xf3, 0x11, 0x2c, 0x88, 0x66, 0x29, 0x29, 0x88, 0x48, 0x49, 0x65, 0x41,
  128. 0x6a, 0x31, 0xdc, 0x74, 0x88, 0x9c, 0x92, 0x1d, 0x17, 0x8b, 0x4f, 0x66, 0x71, 0x89, 0x90, 0x19,
  129. 0x17, 0x07, 0x4c, 0x46, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x4a, 0x0f, 0xc9, 0x4e, 0xb0,
  130. 0x5e, 0x3d, 0x57, 0xa8, 0x8a, 0x20, 0xb8, 0x5a, 0xa5, 0x3a, 0x2e, 0x16, 0xcf, 0xbc, 0xb4, 0x7c,
  131. 0x21, 0x19, 0x2e, 0xce, 0xe4, 0xfc, 0xdc, 0xdc, 0xcc, 0x92, 0x92, 0xd4, 0x14, 0x09, 0x46, 0x05,
  132. 0x46, 0x0d, 0x8e, 0x20, 0x84, 0x80, 0x90, 0x14, 0x17, 0x47, 0x41, 0x51, 0x66, 0x7e, 0x51, 0x66,
  133. 0x49, 0xa5, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x9c, 0x2f, 0x64, 0x83, 0x64, 0x33, 0xb3,
  134. 0x02, 0x23, 0x7e, 0x9b, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x40, 0xd8, 0xef, 0xe4, 0x79, 0xe2,
  135. 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70,
  136. 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xfa, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49,
  137. 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x08, 0xf3, 0x90, 0x99, 0xa8, 0xc1, 0x9d, 0xc4, 0x06, 0xe6, 0x1b,
  138. 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x48, 0xa8, 0xde, 0xed, 0x87, 0x01, 0x00, 0x00,
  139. }
  140. func (m *List) Marshal() (dAtA []byte, err error) {
  141. size := m.Size()
  142. dAtA = make([]byte, size)
  143. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  144. if err != nil {
  145. return nil, err
  146. }
  147. return dAtA[:n], nil
  148. }
  149. func (m *List) MarshalTo(dAtA []byte) (int, error) {
  150. size := m.Size()
  151. return m.MarshalToSizedBuffer(dAtA[:size])
  152. }
  153. func (m *List) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  154. i := len(dAtA)
  155. _ = i
  156. var l int
  157. _ = l
  158. if len(m.Evidence) > 0 {
  159. for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- {
  160. {
  161. size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  162. if err != nil {
  163. return 0, err
  164. }
  165. i -= size
  166. i = encodeVarintMsgs(dAtA, i, uint64(size))
  167. }
  168. i--
  169. dAtA[i] = 0xa
  170. }
  171. }
  172. return len(dAtA) - i, nil
  173. }
  174. func (m *Info) Marshal() (dAtA []byte, err error) {
  175. size := m.Size()
  176. dAtA = make([]byte, size)
  177. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  178. if err != nil {
  179. return nil, err
  180. }
  181. return dAtA[:n], nil
  182. }
  183. func (m *Info) MarshalTo(dAtA []byte) (int, error) {
  184. size := m.Size()
  185. return m.MarshalToSizedBuffer(dAtA[:size])
  186. }
  187. func (m *Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  188. i := len(dAtA)
  189. _ = i
  190. var l int
  191. _ = l
  192. {
  193. size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i])
  194. if err != nil {
  195. return 0, err
  196. }
  197. i -= size
  198. i = encodeVarintMsgs(dAtA, i, uint64(size))
  199. }
  200. i--
  201. dAtA[i] = 0x1a
  202. if m.Priority != 0 {
  203. i = encodeVarintMsgs(dAtA, i, uint64(m.Priority))
  204. i--
  205. dAtA[i] = 0x10
  206. }
  207. if m.Committed {
  208. i--
  209. if m.Committed {
  210. dAtA[i] = 1
  211. } else {
  212. dAtA[i] = 0
  213. }
  214. i--
  215. dAtA[i] = 0x8
  216. }
  217. return len(dAtA) - i, nil
  218. }
  219. func encodeVarintMsgs(dAtA []byte, offset int, v uint64) int {
  220. offset -= sovMsgs(v)
  221. base := offset
  222. for v >= 1<<7 {
  223. dAtA[offset] = uint8(v&0x7f | 0x80)
  224. v >>= 7
  225. offset++
  226. }
  227. dAtA[offset] = uint8(v)
  228. return base
  229. }
  230. func (m *List) Size() (n int) {
  231. if m == nil {
  232. return 0
  233. }
  234. var l int
  235. _ = l
  236. if len(m.Evidence) > 0 {
  237. for _, e := range m.Evidence {
  238. l = e.Size()
  239. n += 1 + l + sovMsgs(uint64(l))
  240. }
  241. }
  242. return n
  243. }
  244. func (m *Info) Size() (n int) {
  245. if m == nil {
  246. return 0
  247. }
  248. var l int
  249. _ = l
  250. if m.Committed {
  251. n += 2
  252. }
  253. if m.Priority != 0 {
  254. n += 1 + sovMsgs(uint64(m.Priority))
  255. }
  256. l = m.Evidence.Size()
  257. n += 1 + l + sovMsgs(uint64(l))
  258. return n
  259. }
  260. func sovMsgs(x uint64) (n int) {
  261. return (math_bits.Len64(x|1) + 6) / 7
  262. }
  263. func sozMsgs(x uint64) (n int) {
  264. return sovMsgs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  265. }
  266. func (m *List) Unmarshal(dAtA []byte) error {
  267. l := len(dAtA)
  268. iNdEx := 0
  269. for iNdEx < l {
  270. preIndex := iNdEx
  271. var wire uint64
  272. for shift := uint(0); ; shift += 7 {
  273. if shift >= 64 {
  274. return ErrIntOverflowMsgs
  275. }
  276. if iNdEx >= l {
  277. return io.ErrUnexpectedEOF
  278. }
  279. b := dAtA[iNdEx]
  280. iNdEx++
  281. wire |= uint64(b&0x7F) << shift
  282. if b < 0x80 {
  283. break
  284. }
  285. }
  286. fieldNum := int32(wire >> 3)
  287. wireType := int(wire & 0x7)
  288. if wireType == 4 {
  289. return fmt.Errorf("proto: List: wiretype end group for non-group")
  290. }
  291. if fieldNum <= 0 {
  292. return fmt.Errorf("proto: List: illegal tag %d (wire type %d)", fieldNum, wire)
  293. }
  294. switch fieldNum {
  295. case 1:
  296. if wireType != 2 {
  297. return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
  298. }
  299. var msglen int
  300. for shift := uint(0); ; shift += 7 {
  301. if shift >= 64 {
  302. return ErrIntOverflowMsgs
  303. }
  304. if iNdEx >= l {
  305. return io.ErrUnexpectedEOF
  306. }
  307. b := dAtA[iNdEx]
  308. iNdEx++
  309. msglen |= int(b&0x7F) << shift
  310. if b < 0x80 {
  311. break
  312. }
  313. }
  314. if msglen < 0 {
  315. return ErrInvalidLengthMsgs
  316. }
  317. postIndex := iNdEx + msglen
  318. if postIndex < 0 {
  319. return ErrInvalidLengthMsgs
  320. }
  321. if postIndex > l {
  322. return io.ErrUnexpectedEOF
  323. }
  324. m.Evidence = append(m.Evidence, &types.Evidence{})
  325. if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  326. return err
  327. }
  328. iNdEx = postIndex
  329. default:
  330. iNdEx = preIndex
  331. skippy, err := skipMsgs(dAtA[iNdEx:])
  332. if err != nil {
  333. return err
  334. }
  335. if skippy < 0 {
  336. return ErrInvalidLengthMsgs
  337. }
  338. if (iNdEx + skippy) < 0 {
  339. return ErrInvalidLengthMsgs
  340. }
  341. if (iNdEx + skippy) > l {
  342. return io.ErrUnexpectedEOF
  343. }
  344. iNdEx += skippy
  345. }
  346. }
  347. if iNdEx > l {
  348. return io.ErrUnexpectedEOF
  349. }
  350. return nil
  351. }
  352. func (m *Info) Unmarshal(dAtA []byte) error {
  353. l := len(dAtA)
  354. iNdEx := 0
  355. for iNdEx < l {
  356. preIndex := iNdEx
  357. var wire uint64
  358. for shift := uint(0); ; shift += 7 {
  359. if shift >= 64 {
  360. return ErrIntOverflowMsgs
  361. }
  362. if iNdEx >= l {
  363. return io.ErrUnexpectedEOF
  364. }
  365. b := dAtA[iNdEx]
  366. iNdEx++
  367. wire |= uint64(b&0x7F) << shift
  368. if b < 0x80 {
  369. break
  370. }
  371. }
  372. fieldNum := int32(wire >> 3)
  373. wireType := int(wire & 0x7)
  374. if wireType == 4 {
  375. return fmt.Errorf("proto: Info: wiretype end group for non-group")
  376. }
  377. if fieldNum <= 0 {
  378. return fmt.Errorf("proto: Info: illegal tag %d (wire type %d)", fieldNum, wire)
  379. }
  380. switch fieldNum {
  381. case 1:
  382. if wireType != 0 {
  383. return fmt.Errorf("proto: wrong wireType = %d for field Committed", wireType)
  384. }
  385. var v int
  386. for shift := uint(0); ; shift += 7 {
  387. if shift >= 64 {
  388. return ErrIntOverflowMsgs
  389. }
  390. if iNdEx >= l {
  391. return io.ErrUnexpectedEOF
  392. }
  393. b := dAtA[iNdEx]
  394. iNdEx++
  395. v |= int(b&0x7F) << shift
  396. if b < 0x80 {
  397. break
  398. }
  399. }
  400. m.Committed = bool(v != 0)
  401. case 2:
  402. if wireType != 0 {
  403. return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType)
  404. }
  405. m.Priority = 0
  406. for shift := uint(0); ; shift += 7 {
  407. if shift >= 64 {
  408. return ErrIntOverflowMsgs
  409. }
  410. if iNdEx >= l {
  411. return io.ErrUnexpectedEOF
  412. }
  413. b := dAtA[iNdEx]
  414. iNdEx++
  415. m.Priority |= int64(b&0x7F) << shift
  416. if b < 0x80 {
  417. break
  418. }
  419. }
  420. case 3:
  421. if wireType != 2 {
  422. return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType)
  423. }
  424. var msglen int
  425. for shift := uint(0); ; shift += 7 {
  426. if shift >= 64 {
  427. return ErrIntOverflowMsgs
  428. }
  429. if iNdEx >= l {
  430. return io.ErrUnexpectedEOF
  431. }
  432. b := dAtA[iNdEx]
  433. iNdEx++
  434. msglen |= int(b&0x7F) << shift
  435. if b < 0x80 {
  436. break
  437. }
  438. }
  439. if msglen < 0 {
  440. return ErrInvalidLengthMsgs
  441. }
  442. postIndex := iNdEx + msglen
  443. if postIndex < 0 {
  444. return ErrInvalidLengthMsgs
  445. }
  446. if postIndex > l {
  447. return io.ErrUnexpectedEOF
  448. }
  449. if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  450. return err
  451. }
  452. iNdEx = postIndex
  453. default:
  454. iNdEx = preIndex
  455. skippy, err := skipMsgs(dAtA[iNdEx:])
  456. if err != nil {
  457. return err
  458. }
  459. if skippy < 0 {
  460. return ErrInvalidLengthMsgs
  461. }
  462. if (iNdEx + skippy) < 0 {
  463. return ErrInvalidLengthMsgs
  464. }
  465. if (iNdEx + skippy) > l {
  466. return io.ErrUnexpectedEOF
  467. }
  468. iNdEx += skippy
  469. }
  470. }
  471. if iNdEx > l {
  472. return io.ErrUnexpectedEOF
  473. }
  474. return nil
  475. }
  476. func skipMsgs(dAtA []byte) (n int, err error) {
  477. l := len(dAtA)
  478. iNdEx := 0
  479. depth := 0
  480. for iNdEx < l {
  481. var wire uint64
  482. for shift := uint(0); ; shift += 7 {
  483. if shift >= 64 {
  484. return 0, ErrIntOverflowMsgs
  485. }
  486. if iNdEx >= l {
  487. return 0, io.ErrUnexpectedEOF
  488. }
  489. b := dAtA[iNdEx]
  490. iNdEx++
  491. wire |= (uint64(b) & 0x7F) << shift
  492. if b < 0x80 {
  493. break
  494. }
  495. }
  496. wireType := int(wire & 0x7)
  497. switch wireType {
  498. case 0:
  499. for shift := uint(0); ; shift += 7 {
  500. if shift >= 64 {
  501. return 0, ErrIntOverflowMsgs
  502. }
  503. if iNdEx >= l {
  504. return 0, io.ErrUnexpectedEOF
  505. }
  506. iNdEx++
  507. if dAtA[iNdEx-1] < 0x80 {
  508. break
  509. }
  510. }
  511. case 1:
  512. iNdEx += 8
  513. case 2:
  514. var length int
  515. for shift := uint(0); ; shift += 7 {
  516. if shift >= 64 {
  517. return 0, ErrIntOverflowMsgs
  518. }
  519. if iNdEx >= l {
  520. return 0, io.ErrUnexpectedEOF
  521. }
  522. b := dAtA[iNdEx]
  523. iNdEx++
  524. length |= (int(b) & 0x7F) << shift
  525. if b < 0x80 {
  526. break
  527. }
  528. }
  529. if length < 0 {
  530. return 0, ErrInvalidLengthMsgs
  531. }
  532. iNdEx += length
  533. case 3:
  534. depth++
  535. case 4:
  536. if depth == 0 {
  537. return 0, ErrUnexpectedEndOfGroupMsgs
  538. }
  539. depth--
  540. case 5:
  541. iNdEx += 4
  542. default:
  543. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  544. }
  545. if iNdEx < 0 {
  546. return 0, ErrInvalidLengthMsgs
  547. }
  548. if depth == 0 {
  549. return iNdEx, nil
  550. }
  551. }
  552. return 0, io.ErrUnexpectedEOF
  553. }
  554. var (
  555. ErrInvalidLengthMsgs = fmt.Errorf("proto: negative length found during unmarshaling")
  556. ErrIntOverflowMsgs = fmt.Errorf("proto: integer overflow")
  557. ErrUnexpectedEndOfGroupMsgs = fmt.Errorf("proto: unexpected end of group")
  558. )