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.

582 lines
13 KiB

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