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.

258 lines
7.8 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: proto/version/version.proto
  3. package version
  4. import (
  5. bytes "bytes"
  6. fmt "fmt"
  7. _ "github.com/gogo/protobuf/gogoproto"
  8. proto "github.com/gogo/protobuf/proto"
  9. math "math"
  10. )
  11. // Reference imports to suppress errors if they are not otherwise used.
  12. var _ = proto.Marshal
  13. var _ = fmt.Errorf
  14. var _ = math.Inf
  15. // This is a compile-time assertion to ensure that this generated file
  16. // is compatible with the proto package it is being compiled against.
  17. // A compilation error at this line likely means your copy of the
  18. // proto package needs to be updated.
  19. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  20. // App includes the protocol and software version for the application.
  21. // This information is included in ResponseInfo. The App.Protocol can be
  22. // updated in ResponseEndBlock.
  23. type App struct {
  24. Protocol uint64 `protobuf:"varint,1,opt,name=protocol,proto3" json:"protocol,omitempty"`
  25. Software string `protobuf:"bytes,2,opt,name=software,proto3" json:"software,omitempty"`
  26. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  27. XXX_unrecognized []byte `json:"-"`
  28. XXX_sizecache int32 `json:"-"`
  29. }
  30. func (m *App) Reset() { *m = App{} }
  31. func (m *App) String() string { return proto.CompactTextString(m) }
  32. func (*App) ProtoMessage() {}
  33. func (*App) Descriptor() ([]byte, []int) {
  34. return fileDescriptor_14aa2353622f11e1, []int{0}
  35. }
  36. func (m *App) XXX_Unmarshal(b []byte) error {
  37. return xxx_messageInfo_App.Unmarshal(m, b)
  38. }
  39. func (m *App) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  40. return xxx_messageInfo_App.Marshal(b, m, deterministic)
  41. }
  42. func (m *App) XXX_Merge(src proto.Message) {
  43. xxx_messageInfo_App.Merge(m, src)
  44. }
  45. func (m *App) XXX_Size() int {
  46. return xxx_messageInfo_App.Size(m)
  47. }
  48. func (m *App) XXX_DiscardUnknown() {
  49. xxx_messageInfo_App.DiscardUnknown(m)
  50. }
  51. var xxx_messageInfo_App proto.InternalMessageInfo
  52. func (m *App) GetProtocol() uint64 {
  53. if m != nil {
  54. return m.Protocol
  55. }
  56. return 0
  57. }
  58. func (m *App) GetSoftware() string {
  59. if m != nil {
  60. return m.Software
  61. }
  62. return ""
  63. }
  64. // Consensus captures the consensus rules for processing a block in the blockchain,
  65. // including all blockchain data structures and the rules of the application's
  66. // state transition machine.
  67. type Consensus struct {
  68. Block uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"`
  69. App uint64 `protobuf:"varint,2,opt,name=app,proto3" json:"app,omitempty"`
  70. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  71. XXX_unrecognized []byte `json:"-"`
  72. XXX_sizecache int32 `json:"-"`
  73. }
  74. func (m *Consensus) Reset() { *m = Consensus{} }
  75. func (m *Consensus) String() string { return proto.CompactTextString(m) }
  76. func (*Consensus) ProtoMessage() {}
  77. func (*Consensus) Descriptor() ([]byte, []int) {
  78. return fileDescriptor_14aa2353622f11e1, []int{1}
  79. }
  80. func (m *Consensus) XXX_Unmarshal(b []byte) error {
  81. return xxx_messageInfo_Consensus.Unmarshal(m, b)
  82. }
  83. func (m *Consensus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  84. return xxx_messageInfo_Consensus.Marshal(b, m, deterministic)
  85. }
  86. func (m *Consensus) XXX_Merge(src proto.Message) {
  87. xxx_messageInfo_Consensus.Merge(m, src)
  88. }
  89. func (m *Consensus) XXX_Size() int {
  90. return xxx_messageInfo_Consensus.Size(m)
  91. }
  92. func (m *Consensus) XXX_DiscardUnknown() {
  93. xxx_messageInfo_Consensus.DiscardUnknown(m)
  94. }
  95. var xxx_messageInfo_Consensus proto.InternalMessageInfo
  96. func (m *Consensus) GetBlock() uint64 {
  97. if m != nil {
  98. return m.Block
  99. }
  100. return 0
  101. }
  102. func (m *Consensus) GetApp() uint64 {
  103. if m != nil {
  104. return m.App
  105. }
  106. return 0
  107. }
  108. func init() {
  109. proto.RegisterType((*App)(nil), "tendermint.proto.version.App")
  110. proto.RegisterType((*Consensus)(nil), "tendermint.proto.version.Consensus")
  111. }
  112. func init() { proto.RegisterFile("proto/version/version.proto", fileDescriptor_14aa2353622f11e1) }
  113. var fileDescriptor_14aa2353622f11e1 = []byte{
  114. // 203 bytes of a gzipped FileDescriptorProto
  115. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x28, 0xca, 0x2f,
  116. 0xc9, 0xd7, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x83, 0xd1, 0x7a, 0x60, 0x51, 0x21, 0x89,
  117. 0x92, 0xd4, 0xbc, 0x94, 0xd4, 0xa2, 0xdc, 0xcc, 0xbc, 0x12, 0x88, 0x88, 0x1e, 0x54, 0x5e, 0x4a,
  118. 0xad, 0x24, 0x23, 0xb3, 0x28, 0x25, 0xbe, 0x20, 0xb1, 0xa8, 0xa4, 0x52, 0x1f, 0x62, 0x44, 0x7a,
  119. 0x7e, 0x7a, 0x3e, 0x82, 0x05, 0x51, 0xaf, 0x64, 0xcb, 0xc5, 0xec, 0x58, 0x50, 0x20, 0x24, 0xc5,
  120. 0xc5, 0x01, 0xe6, 0x27, 0xe7, 0xe7, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x04, 0xc1, 0xf9, 0x20,
  121. 0xb9, 0xe2, 0xfc, 0xb4, 0x92, 0xf2, 0xc4, 0xa2, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20,
  122. 0x38, 0x5f, 0xc9, 0x96, 0x8b, 0xd3, 0x39, 0x3f, 0xaf, 0x38, 0x35, 0xaf, 0xb8, 0xb4, 0x58, 0x48,
  123. 0x84, 0x8b, 0x35, 0x29, 0x27, 0x3f, 0x39, 0x1b, 0x6a, 0x02, 0x84, 0x23, 0x24, 0xc0, 0xc5, 0x9c,
  124. 0x58, 0x50, 0x00, 0xd6, 0xc9, 0x12, 0x04, 0x62, 0x5a, 0x71, 0xec, 0x58, 0x20, 0xcf, 0xf8, 0x62,
  125. 0x81, 0x3c, 0xa3, 0x93, 0x41, 0x94, 0x5e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e,
  126. 0xae, 0x3e, 0xc2, 0x33, 0xc8, 0x4c, 0x14, 0xff, 0x27, 0xb1, 0x81, 0xb9, 0xc6, 0x80, 0x00, 0x00,
  127. 0x00, 0xff, 0xff, 0x20, 0x9f, 0x49, 0xf1, 0x17, 0x01, 0x00, 0x00,
  128. }
  129. func (this *Consensus) Equal(that interface{}) bool {
  130. if that == nil {
  131. return this == nil
  132. }
  133. that1, ok := that.(*Consensus)
  134. if !ok {
  135. that2, ok := that.(Consensus)
  136. if ok {
  137. that1 = &that2
  138. } else {
  139. return false
  140. }
  141. }
  142. if that1 == nil {
  143. return this == nil
  144. } else if this == nil {
  145. return false
  146. }
  147. if this.Block != that1.Block {
  148. return false
  149. }
  150. if this.App != that1.App {
  151. return false
  152. }
  153. if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
  154. return false
  155. }
  156. return true
  157. }
  158. func NewPopulatedConsensus(r randyVersion, easy bool) *Consensus {
  159. this := &Consensus{}
  160. this.Block = uint64(uint64(r.Uint32()))
  161. this.App = uint64(uint64(r.Uint32()))
  162. if !easy && r.Intn(10) != 0 {
  163. this.XXX_unrecognized = randUnrecognizedVersion(r, 3)
  164. }
  165. return this
  166. }
  167. type randyVersion interface {
  168. Float32() float32
  169. Float64() float64
  170. Int63() int64
  171. Int31() int32
  172. Uint32() uint32
  173. Intn(n int) int
  174. }
  175. func randUTF8RuneVersion(r randyVersion) rune {
  176. ru := r.Intn(62)
  177. if ru < 10 {
  178. return rune(ru + 48)
  179. } else if ru < 36 {
  180. return rune(ru + 55)
  181. }
  182. return rune(ru + 61)
  183. }
  184. func randStringVersion(r randyVersion) string {
  185. v1 := r.Intn(100)
  186. tmps := make([]rune, v1)
  187. for i := 0; i < v1; i++ {
  188. tmps[i] = randUTF8RuneVersion(r)
  189. }
  190. return string(tmps)
  191. }
  192. func randUnrecognizedVersion(r randyVersion, maxFieldNumber int) (dAtA []byte) {
  193. l := r.Intn(5)
  194. for i := 0; i < l; i++ {
  195. wire := r.Intn(4)
  196. if wire == 3 {
  197. wire = 5
  198. }
  199. fieldNumber := maxFieldNumber + r.Intn(100)
  200. dAtA = randFieldVersion(dAtA, r, fieldNumber, wire)
  201. }
  202. return dAtA
  203. }
  204. func randFieldVersion(dAtA []byte, r randyVersion, fieldNumber int, wire int) []byte {
  205. key := uint32(fieldNumber)<<3 | uint32(wire)
  206. switch wire {
  207. case 0:
  208. dAtA = encodeVarintPopulateVersion(dAtA, uint64(key))
  209. v2 := r.Int63()
  210. if r.Intn(2) == 0 {
  211. v2 *= -1
  212. }
  213. dAtA = encodeVarintPopulateVersion(dAtA, uint64(v2))
  214. case 1:
  215. dAtA = encodeVarintPopulateVersion(dAtA, uint64(key))
  216. dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
  217. case 2:
  218. dAtA = encodeVarintPopulateVersion(dAtA, uint64(key))
  219. ll := r.Intn(100)
  220. dAtA = encodeVarintPopulateVersion(dAtA, uint64(ll))
  221. for j := 0; j < ll; j++ {
  222. dAtA = append(dAtA, byte(r.Intn(256)))
  223. }
  224. default:
  225. dAtA = encodeVarintPopulateVersion(dAtA, uint64(key))
  226. dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
  227. }
  228. return dAtA
  229. }
  230. func encodeVarintPopulateVersion(dAtA []byte, v uint64) []byte {
  231. for v >= 1<<7 {
  232. dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
  233. v >>= 7
  234. }
  235. dAtA = append(dAtA, uint8(v))
  236. return dAtA
  237. }