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.

1133 lines
36 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: proto/types/types.proto
  3. package types
  4. import (
  5. bytes "bytes"
  6. fmt "fmt"
  7. _ "github.com/gogo/protobuf/gogoproto"
  8. proto "github.com/gogo/protobuf/proto"
  9. github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
  10. _ "github.com/golang/protobuf/ptypes/timestamp"
  11. bits "github.com/tendermint/tendermint/proto/libs/bits"
  12. version "github.com/tendermint/tendermint/proto/version"
  13. math "math"
  14. time "time"
  15. )
  16. // Reference imports to suppress errors if they are not otherwise used.
  17. var _ = proto.Marshal
  18. var _ = fmt.Errorf
  19. var _ = math.Inf
  20. var _ = time.Kitchen
  21. // This is a compile-time assertion to ensure that this generated file
  22. // is compatible with the proto package it is being compiled against.
  23. // A compilation error at this line likely means your copy of the
  24. // proto package needs to be updated.
  25. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  26. // BlockIdFlag indicates which BlcokID the signature is for
  27. type BlockIDFlag int32
  28. const (
  29. BLOCKD_ID_FLAG_UNKNOWN BlockIDFlag = 0
  30. BlockIDFlagAbsent BlockIDFlag = 1
  31. BlockIDFlagCommit BlockIDFlag = 2
  32. BlockIDFlagNil BlockIDFlag = 3
  33. )
  34. var BlockIDFlag_name = map[int32]string{
  35. 0: "BLOCKD_ID_FLAG_UNKNOWN",
  36. 1: "BLOCK_ID_FLAG_ABSENT",
  37. 2: "BLOCK_ID_FLAG_COMMIT",
  38. 3: "BLOCK_ID_FLAG_NIL",
  39. }
  40. var BlockIDFlag_value = map[string]int32{
  41. "BLOCKD_ID_FLAG_UNKNOWN": 0,
  42. "BLOCK_ID_FLAG_ABSENT": 1,
  43. "BLOCK_ID_FLAG_COMMIT": 2,
  44. "BLOCK_ID_FLAG_NIL": 3,
  45. }
  46. func (BlockIDFlag) EnumDescriptor() ([]byte, []int) {
  47. return fileDescriptor_ff06f8095857fb18, []int{0}
  48. }
  49. // SignedMsgType is a type of signed message in the consensus.
  50. type SignedMsgType int32
  51. const (
  52. SIGNED_MSG_TYPE_UNKNOWN SignedMsgType = 0
  53. PrevoteType SignedMsgType = 1
  54. PrecommitType SignedMsgType = 2
  55. ProposalType SignedMsgType = 3
  56. )
  57. var SignedMsgType_name = map[int32]string{
  58. 0: "SIGNED_MSG_TYPE_UNKNOWN",
  59. 1: "PREVOTE_TYPE",
  60. 2: "PRECOMMIT_TYPE",
  61. 3: "PROPOSAL_TYPE",
  62. }
  63. var SignedMsgType_value = map[string]int32{
  64. "SIGNED_MSG_TYPE_UNKNOWN": 0,
  65. "PREVOTE_TYPE": 1,
  66. "PRECOMMIT_TYPE": 2,
  67. "PROPOSAL_TYPE": 3,
  68. }
  69. func (SignedMsgType) EnumDescriptor() ([]byte, []int) {
  70. return fileDescriptor_ff06f8095857fb18, []int{1}
  71. }
  72. // PartsetHeader
  73. type PartSetHeader struct {
  74. Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
  75. Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
  76. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  77. XXX_unrecognized []byte `json:"-"`
  78. XXX_sizecache int32 `json:"-"`
  79. }
  80. func (m *PartSetHeader) Reset() { *m = PartSetHeader{} }
  81. func (m *PartSetHeader) String() string { return proto.CompactTextString(m) }
  82. func (*PartSetHeader) ProtoMessage() {}
  83. func (*PartSetHeader) Descriptor() ([]byte, []int) {
  84. return fileDescriptor_ff06f8095857fb18, []int{0}
  85. }
  86. func (m *PartSetHeader) XXX_Unmarshal(b []byte) error {
  87. return xxx_messageInfo_PartSetHeader.Unmarshal(m, b)
  88. }
  89. func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  90. return xxx_messageInfo_PartSetHeader.Marshal(b, m, deterministic)
  91. }
  92. func (m *PartSetHeader) XXX_Merge(src proto.Message) {
  93. xxx_messageInfo_PartSetHeader.Merge(m, src)
  94. }
  95. func (m *PartSetHeader) XXX_Size() int {
  96. return xxx_messageInfo_PartSetHeader.Size(m)
  97. }
  98. func (m *PartSetHeader) XXX_DiscardUnknown() {
  99. xxx_messageInfo_PartSetHeader.DiscardUnknown(m)
  100. }
  101. var xxx_messageInfo_PartSetHeader proto.InternalMessageInfo
  102. func (m *PartSetHeader) GetTotal() uint32 {
  103. if m != nil {
  104. return m.Total
  105. }
  106. return 0
  107. }
  108. func (m *PartSetHeader) GetHash() []byte {
  109. if m != nil {
  110. return m.Hash
  111. }
  112. return nil
  113. }
  114. // BlockID
  115. type BlockID struct {
  116. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
  117. PartsHeader PartSetHeader `protobuf:"bytes,2,opt,name=parts_header,json=partsHeader,proto3" json:"parts_header"`
  118. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  119. XXX_unrecognized []byte `json:"-"`
  120. XXX_sizecache int32 `json:"-"`
  121. }
  122. func (m *BlockID) Reset() { *m = BlockID{} }
  123. func (m *BlockID) String() string { return proto.CompactTextString(m) }
  124. func (*BlockID) ProtoMessage() {}
  125. func (*BlockID) Descriptor() ([]byte, []int) {
  126. return fileDescriptor_ff06f8095857fb18, []int{1}
  127. }
  128. func (m *BlockID) XXX_Unmarshal(b []byte) error {
  129. return xxx_messageInfo_BlockID.Unmarshal(m, b)
  130. }
  131. func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  132. return xxx_messageInfo_BlockID.Marshal(b, m, deterministic)
  133. }
  134. func (m *BlockID) XXX_Merge(src proto.Message) {
  135. xxx_messageInfo_BlockID.Merge(m, src)
  136. }
  137. func (m *BlockID) XXX_Size() int {
  138. return xxx_messageInfo_BlockID.Size(m)
  139. }
  140. func (m *BlockID) XXX_DiscardUnknown() {
  141. xxx_messageInfo_BlockID.DiscardUnknown(m)
  142. }
  143. var xxx_messageInfo_BlockID proto.InternalMessageInfo
  144. func (m *BlockID) GetHash() []byte {
  145. if m != nil {
  146. return m.Hash
  147. }
  148. return nil
  149. }
  150. func (m *BlockID) GetPartsHeader() PartSetHeader {
  151. if m != nil {
  152. return m.PartsHeader
  153. }
  154. return PartSetHeader{}
  155. }
  156. // Header defines the structure of a Tendermint block header.
  157. type Header struct {
  158. // basic block info
  159. Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
  160. ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  161. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
  162. Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
  163. // prev block info
  164. LastBlockID BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"`
  165. // hashes of block data
  166. LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"`
  167. DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
  168. // hashes from the app output from the prev block
  169. ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
  170. NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"`
  171. ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"`
  172. AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  173. LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"`
  174. // consensus info
  175. EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"`
  176. ProposerAddress []byte `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
  177. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  178. XXX_unrecognized []byte `json:"-"`
  179. XXX_sizecache int32 `json:"-"`
  180. }
  181. func (m *Header) Reset() { *m = Header{} }
  182. func (m *Header) String() string { return proto.CompactTextString(m) }
  183. func (*Header) ProtoMessage() {}
  184. func (*Header) Descriptor() ([]byte, []int) {
  185. return fileDescriptor_ff06f8095857fb18, []int{2}
  186. }
  187. func (m *Header) XXX_Unmarshal(b []byte) error {
  188. return xxx_messageInfo_Header.Unmarshal(m, b)
  189. }
  190. func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  191. return xxx_messageInfo_Header.Marshal(b, m, deterministic)
  192. }
  193. func (m *Header) XXX_Merge(src proto.Message) {
  194. xxx_messageInfo_Header.Merge(m, src)
  195. }
  196. func (m *Header) XXX_Size() int {
  197. return xxx_messageInfo_Header.Size(m)
  198. }
  199. func (m *Header) XXX_DiscardUnknown() {
  200. xxx_messageInfo_Header.DiscardUnknown(m)
  201. }
  202. var xxx_messageInfo_Header proto.InternalMessageInfo
  203. func (m *Header) GetVersion() version.Consensus {
  204. if m != nil {
  205. return m.Version
  206. }
  207. return version.Consensus{}
  208. }
  209. func (m *Header) GetChainID() string {
  210. if m != nil {
  211. return m.ChainID
  212. }
  213. return ""
  214. }
  215. func (m *Header) GetHeight() int64 {
  216. if m != nil {
  217. return m.Height
  218. }
  219. return 0
  220. }
  221. func (m *Header) GetTime() time.Time {
  222. if m != nil {
  223. return m.Time
  224. }
  225. return time.Time{}
  226. }
  227. func (m *Header) GetLastBlockID() BlockID {
  228. if m != nil {
  229. return m.LastBlockID
  230. }
  231. return BlockID{}
  232. }
  233. func (m *Header) GetLastCommitHash() []byte {
  234. if m != nil {
  235. return m.LastCommitHash
  236. }
  237. return nil
  238. }
  239. func (m *Header) GetDataHash() []byte {
  240. if m != nil {
  241. return m.DataHash
  242. }
  243. return nil
  244. }
  245. func (m *Header) GetValidatorsHash() []byte {
  246. if m != nil {
  247. return m.ValidatorsHash
  248. }
  249. return nil
  250. }
  251. func (m *Header) GetNextValidatorsHash() []byte {
  252. if m != nil {
  253. return m.NextValidatorsHash
  254. }
  255. return nil
  256. }
  257. func (m *Header) GetConsensusHash() []byte {
  258. if m != nil {
  259. return m.ConsensusHash
  260. }
  261. return nil
  262. }
  263. func (m *Header) GetAppHash() []byte {
  264. if m != nil {
  265. return m.AppHash
  266. }
  267. return nil
  268. }
  269. func (m *Header) GetLastResultsHash() []byte {
  270. if m != nil {
  271. return m.LastResultsHash
  272. }
  273. return nil
  274. }
  275. func (m *Header) GetEvidenceHash() []byte {
  276. if m != nil {
  277. return m.EvidenceHash
  278. }
  279. return nil
  280. }
  281. func (m *Header) GetProposerAddress() []byte {
  282. if m != nil {
  283. return m.ProposerAddress
  284. }
  285. return nil
  286. }
  287. // Data contains the set of transactions included in the block
  288. type Data struct {
  289. // Txs that will be applied by state @ block.Height+1.
  290. // NOTE: not all txs here are valid. We're just agreeing on the order first.
  291. // This means that block.AppHash does not include these txs.
  292. Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
  293. // Volatile
  294. Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
  295. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  296. XXX_unrecognized []byte `json:"-"`
  297. XXX_sizecache int32 `json:"-"`
  298. }
  299. func (m *Data) Reset() { *m = Data{} }
  300. func (m *Data) String() string { return proto.CompactTextString(m) }
  301. func (*Data) ProtoMessage() {}
  302. func (*Data) Descriptor() ([]byte, []int) {
  303. return fileDescriptor_ff06f8095857fb18, []int{3}
  304. }
  305. func (m *Data) XXX_Unmarshal(b []byte) error {
  306. return xxx_messageInfo_Data.Unmarshal(m, b)
  307. }
  308. func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  309. return xxx_messageInfo_Data.Marshal(b, m, deterministic)
  310. }
  311. func (m *Data) XXX_Merge(src proto.Message) {
  312. xxx_messageInfo_Data.Merge(m, src)
  313. }
  314. func (m *Data) XXX_Size() int {
  315. return xxx_messageInfo_Data.Size(m)
  316. }
  317. func (m *Data) XXX_DiscardUnknown() {
  318. xxx_messageInfo_Data.DiscardUnknown(m)
  319. }
  320. var xxx_messageInfo_Data proto.InternalMessageInfo
  321. func (m *Data) GetTxs() [][]byte {
  322. if m != nil {
  323. return m.Txs
  324. }
  325. return nil
  326. }
  327. func (m *Data) GetHash() []byte {
  328. if m != nil {
  329. return m.Hash
  330. }
  331. return nil
  332. }
  333. // Vote represents a prevote, precommit, or commit vote from validators for
  334. // consensus.
  335. type Vote struct {
  336. Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"`
  337. Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
  338. Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"`
  339. BlockID BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"`
  340. Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
  341. ValidatorAddress []byte `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
  342. ValidatorIndex uint32 `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"`
  343. Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"`
  344. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  345. XXX_unrecognized []byte `json:"-"`
  346. XXX_sizecache int32 `json:"-"`
  347. }
  348. func (m *Vote) Reset() { *m = Vote{} }
  349. func (m *Vote) String() string { return proto.CompactTextString(m) }
  350. func (*Vote) ProtoMessage() {}
  351. func (*Vote) Descriptor() ([]byte, []int) {
  352. return fileDescriptor_ff06f8095857fb18, []int{4}
  353. }
  354. func (m *Vote) XXX_Unmarshal(b []byte) error {
  355. return xxx_messageInfo_Vote.Unmarshal(m, b)
  356. }
  357. func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  358. return xxx_messageInfo_Vote.Marshal(b, m, deterministic)
  359. }
  360. func (m *Vote) XXX_Merge(src proto.Message) {
  361. xxx_messageInfo_Vote.Merge(m, src)
  362. }
  363. func (m *Vote) XXX_Size() int {
  364. return xxx_messageInfo_Vote.Size(m)
  365. }
  366. func (m *Vote) XXX_DiscardUnknown() {
  367. xxx_messageInfo_Vote.DiscardUnknown(m)
  368. }
  369. var xxx_messageInfo_Vote proto.InternalMessageInfo
  370. func (m *Vote) GetType() SignedMsgType {
  371. if m != nil {
  372. return m.Type
  373. }
  374. return SIGNED_MSG_TYPE_UNKNOWN
  375. }
  376. func (m *Vote) GetHeight() int64 {
  377. if m != nil {
  378. return m.Height
  379. }
  380. return 0
  381. }
  382. func (m *Vote) GetRound() int32 {
  383. if m != nil {
  384. return m.Round
  385. }
  386. return 0
  387. }
  388. func (m *Vote) GetBlockID() BlockID {
  389. if m != nil {
  390. return m.BlockID
  391. }
  392. return BlockID{}
  393. }
  394. func (m *Vote) GetTimestamp() time.Time {
  395. if m != nil {
  396. return m.Timestamp
  397. }
  398. return time.Time{}
  399. }
  400. func (m *Vote) GetValidatorAddress() []byte {
  401. if m != nil {
  402. return m.ValidatorAddress
  403. }
  404. return nil
  405. }
  406. func (m *Vote) GetValidatorIndex() uint32 {
  407. if m != nil {
  408. return m.ValidatorIndex
  409. }
  410. return 0
  411. }
  412. func (m *Vote) GetSignature() []byte {
  413. if m != nil {
  414. return m.Signature
  415. }
  416. return nil
  417. }
  418. // Commit contains the evidence that a block was committed by a set of validators.
  419. type Commit 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. BlockID BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"`
  423. Signatures []CommitSig `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures"`
  424. Hash []byte `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"`
  425. BitArray *bits.BitArray `protobuf:"bytes,6,opt,name=bit_array,json=bitArray,proto3" json:"bit_array,omitempty"`
  426. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  427. XXX_unrecognized []byte `json:"-"`
  428. XXX_sizecache int32 `json:"-"`
  429. }
  430. func (m *Commit) Reset() { *m = Commit{} }
  431. func (m *Commit) String() string { return proto.CompactTextString(m) }
  432. func (*Commit) ProtoMessage() {}
  433. func (*Commit) Descriptor() ([]byte, []int) {
  434. return fileDescriptor_ff06f8095857fb18, []int{5}
  435. }
  436. func (m *Commit) XXX_Unmarshal(b []byte) error {
  437. return xxx_messageInfo_Commit.Unmarshal(m, b)
  438. }
  439. func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  440. return xxx_messageInfo_Commit.Marshal(b, m, deterministic)
  441. }
  442. func (m *Commit) XXX_Merge(src proto.Message) {
  443. xxx_messageInfo_Commit.Merge(m, src)
  444. }
  445. func (m *Commit) XXX_Size() int {
  446. return xxx_messageInfo_Commit.Size(m)
  447. }
  448. func (m *Commit) XXX_DiscardUnknown() {
  449. xxx_messageInfo_Commit.DiscardUnknown(m)
  450. }
  451. var xxx_messageInfo_Commit proto.InternalMessageInfo
  452. func (m *Commit) GetHeight() int64 {
  453. if m != nil {
  454. return m.Height
  455. }
  456. return 0
  457. }
  458. func (m *Commit) GetRound() int32 {
  459. if m != nil {
  460. return m.Round
  461. }
  462. return 0
  463. }
  464. func (m *Commit) GetBlockID() BlockID {
  465. if m != nil {
  466. return m.BlockID
  467. }
  468. return BlockID{}
  469. }
  470. func (m *Commit) GetSignatures() []CommitSig {
  471. if m != nil {
  472. return m.Signatures
  473. }
  474. return nil
  475. }
  476. func (m *Commit) GetHash() []byte {
  477. if m != nil {
  478. return m.Hash
  479. }
  480. return nil
  481. }
  482. func (m *Commit) GetBitArray() *bits.BitArray {
  483. if m != nil {
  484. return m.BitArray
  485. }
  486. return nil
  487. }
  488. // CommitSig is a part of the Vote included in a Commit.
  489. type CommitSig struct {
  490. BlockIdFlag BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=tendermint.proto.types.BlockIDFlag" json:"block_id_flag,omitempty"`
  491. ValidatorAddress []byte `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
  492. Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
  493. Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
  494. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  495. XXX_unrecognized []byte `json:"-"`
  496. XXX_sizecache int32 `json:"-"`
  497. }
  498. func (m *CommitSig) Reset() { *m = CommitSig{} }
  499. func (m *CommitSig) String() string { return proto.CompactTextString(m) }
  500. func (*CommitSig) ProtoMessage() {}
  501. func (*CommitSig) Descriptor() ([]byte, []int) {
  502. return fileDescriptor_ff06f8095857fb18, []int{6}
  503. }
  504. func (m *CommitSig) XXX_Unmarshal(b []byte) error {
  505. return xxx_messageInfo_CommitSig.Unmarshal(m, b)
  506. }
  507. func (m *CommitSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  508. return xxx_messageInfo_CommitSig.Marshal(b, m, deterministic)
  509. }
  510. func (m *CommitSig) XXX_Merge(src proto.Message) {
  511. xxx_messageInfo_CommitSig.Merge(m, src)
  512. }
  513. func (m *CommitSig) XXX_Size() int {
  514. return xxx_messageInfo_CommitSig.Size(m)
  515. }
  516. func (m *CommitSig) XXX_DiscardUnknown() {
  517. xxx_messageInfo_CommitSig.DiscardUnknown(m)
  518. }
  519. var xxx_messageInfo_CommitSig proto.InternalMessageInfo
  520. func (m *CommitSig) GetBlockIdFlag() BlockIDFlag {
  521. if m != nil {
  522. return m.BlockIdFlag
  523. }
  524. return BLOCKD_ID_FLAG_UNKNOWN
  525. }
  526. func (m *CommitSig) GetValidatorAddress() []byte {
  527. if m != nil {
  528. return m.ValidatorAddress
  529. }
  530. return nil
  531. }
  532. func (m *CommitSig) GetTimestamp() time.Time {
  533. if m != nil {
  534. return m.Timestamp
  535. }
  536. return time.Time{}
  537. }
  538. func (m *CommitSig) GetSignature() []byte {
  539. if m != nil {
  540. return m.Signature
  541. }
  542. return nil
  543. }
  544. type Proposal struct {
  545. Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"`
  546. Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
  547. Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"`
  548. PolRound int32 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"`
  549. BlockID BlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id"`
  550. Timestamp time.Time `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
  551. Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"`
  552. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  553. XXX_unrecognized []byte `json:"-"`
  554. XXX_sizecache int32 `json:"-"`
  555. }
  556. func (m *Proposal) Reset() { *m = Proposal{} }
  557. func (m *Proposal) String() string { return proto.CompactTextString(m) }
  558. func (*Proposal) ProtoMessage() {}
  559. func (*Proposal) Descriptor() ([]byte, []int) {
  560. return fileDescriptor_ff06f8095857fb18, []int{7}
  561. }
  562. func (m *Proposal) XXX_Unmarshal(b []byte) error {
  563. return xxx_messageInfo_Proposal.Unmarshal(m, b)
  564. }
  565. func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  566. return xxx_messageInfo_Proposal.Marshal(b, m, deterministic)
  567. }
  568. func (m *Proposal) XXX_Merge(src proto.Message) {
  569. xxx_messageInfo_Proposal.Merge(m, src)
  570. }
  571. func (m *Proposal) XXX_Size() int {
  572. return xxx_messageInfo_Proposal.Size(m)
  573. }
  574. func (m *Proposal) XXX_DiscardUnknown() {
  575. xxx_messageInfo_Proposal.DiscardUnknown(m)
  576. }
  577. var xxx_messageInfo_Proposal proto.InternalMessageInfo
  578. func (m *Proposal) GetType() SignedMsgType {
  579. if m != nil {
  580. return m.Type
  581. }
  582. return SIGNED_MSG_TYPE_UNKNOWN
  583. }
  584. func (m *Proposal) GetHeight() int64 {
  585. if m != nil {
  586. return m.Height
  587. }
  588. return 0
  589. }
  590. func (m *Proposal) GetRound() int32 {
  591. if m != nil {
  592. return m.Round
  593. }
  594. return 0
  595. }
  596. func (m *Proposal) GetPolRound() int32 {
  597. if m != nil {
  598. return m.PolRound
  599. }
  600. return 0
  601. }
  602. func (m *Proposal) GetBlockID() BlockID {
  603. if m != nil {
  604. return m.BlockID
  605. }
  606. return BlockID{}
  607. }
  608. func (m *Proposal) GetTimestamp() time.Time {
  609. if m != nil {
  610. return m.Timestamp
  611. }
  612. return time.Time{}
  613. }
  614. func (m *Proposal) GetSignature() []byte {
  615. if m != nil {
  616. return m.Signature
  617. }
  618. return nil
  619. }
  620. type SignedHeader struct {
  621. Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
  622. Commit *Commit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
  623. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  624. XXX_unrecognized []byte `json:"-"`
  625. XXX_sizecache int32 `json:"-"`
  626. }
  627. func (m *SignedHeader) Reset() { *m = SignedHeader{} }
  628. func (m *SignedHeader) String() string { return proto.CompactTextString(m) }
  629. func (*SignedHeader) ProtoMessage() {}
  630. func (*SignedHeader) Descriptor() ([]byte, []int) {
  631. return fileDescriptor_ff06f8095857fb18, []int{8}
  632. }
  633. func (m *SignedHeader) XXX_Unmarshal(b []byte) error {
  634. return xxx_messageInfo_SignedHeader.Unmarshal(m, b)
  635. }
  636. func (m *SignedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  637. return xxx_messageInfo_SignedHeader.Marshal(b, m, deterministic)
  638. }
  639. func (m *SignedHeader) XXX_Merge(src proto.Message) {
  640. xxx_messageInfo_SignedHeader.Merge(m, src)
  641. }
  642. func (m *SignedHeader) XXX_Size() int {
  643. return xxx_messageInfo_SignedHeader.Size(m)
  644. }
  645. func (m *SignedHeader) XXX_DiscardUnknown() {
  646. xxx_messageInfo_SignedHeader.DiscardUnknown(m)
  647. }
  648. var xxx_messageInfo_SignedHeader proto.InternalMessageInfo
  649. func (m *SignedHeader) GetHeader() *Header {
  650. if m != nil {
  651. return m.Header
  652. }
  653. return nil
  654. }
  655. func (m *SignedHeader) GetCommit() *Commit {
  656. if m != nil {
  657. return m.Commit
  658. }
  659. return nil
  660. }
  661. func init() {
  662. proto.RegisterEnum("tendermint.proto.types.BlockIDFlag", BlockIDFlag_name, BlockIDFlag_value)
  663. proto.RegisterEnum("tendermint.proto.types.SignedMsgType", SignedMsgType_name, SignedMsgType_value)
  664. proto.RegisterType((*PartSetHeader)(nil), "tendermint.proto.types.PartSetHeader")
  665. proto.RegisterType((*BlockID)(nil), "tendermint.proto.types.BlockID")
  666. proto.RegisterType((*Header)(nil), "tendermint.proto.types.Header")
  667. proto.RegisterType((*Data)(nil), "tendermint.proto.types.Data")
  668. proto.RegisterType((*Vote)(nil), "tendermint.proto.types.Vote")
  669. proto.RegisterType((*Commit)(nil), "tendermint.proto.types.Commit")
  670. proto.RegisterType((*CommitSig)(nil), "tendermint.proto.types.CommitSig")
  671. proto.RegisterType((*Proposal)(nil), "tendermint.proto.types.Proposal")
  672. proto.RegisterType((*SignedHeader)(nil), "tendermint.proto.types.SignedHeader")
  673. }
  674. func init() { proto.RegisterFile("proto/types/types.proto", fileDescriptor_ff06f8095857fb18) }
  675. var fileDescriptor_ff06f8095857fb18 = []byte{
  676. // 1154 bytes of a gzipped FileDescriptorProto
  677. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdd, 0x6e, 0xe3, 0xc4,
  678. 0x17, 0xaf, 0xf3, 0x9d, 0xe3, 0x24, 0x4d, 0xfd, 0xef, 0x7f, 0x37, 0xa4, 0xa8, 0xc9, 0xb6, 0x74,
  679. 0xc9, 0x96, 0x95, 0x83, 0x8a, 0x84, 0x80, 0xbb, 0x7c, 0x6d, 0x37, 0x6a, 0x9b, 0x44, 0x4e, 0x28,
  680. 0x1f, 0x37, 0xd6, 0x24, 0x9e, 0x75, 0x2c, 0x1c, 0xdb, 0xb2, 0x27, 0xa5, 0xbd, 0xe1, 0x1a, 0x95,
  681. 0x1b, 0x5e, 0xa0, 0xd2, 0x4a, 0x0b, 0x12, 0x8f, 0xc0, 0x1d, 0x5c, 0xf2, 0x14, 0x45, 0x5a, 0x6e,
  682. 0x78, 0x00, 0x1e, 0x00, 0x79, 0x66, 0xec, 0x38, 0x6d, 0x03, 0x2b, 0x58, 0x71, 0xd3, 0xce, 0x9c,
  683. 0xf3, 0x3b, 0x67, 0xce, 0xfc, 0xce, 0xef, 0x78, 0x02, 0xf7, 0x1d, 0xd7, 0x26, 0x76, 0x9d, 0x5c,
  684. 0x38, 0xd8, 0x63, 0x7f, 0x65, 0x6a, 0x91, 0xee, 0x11, 0x6c, 0x69, 0xd8, 0x9d, 0x19, 0x16, 0x61,
  685. 0x16, 0x99, 0x7a, 0xcb, 0x0f, 0xc9, 0xd4, 0x70, 0x35, 0xd5, 0x41, 0x2e, 0xb9, 0xa8, 0xb3, 0x60,
  686. 0xdd, 0xd6, 0xed, 0xc5, 0x8a, 0xa1, 0xcb, 0x15, 0xdd, 0xb6, 0x75, 0x13, 0x33, 0xc8, 0x78, 0xfe,
  687. 0xac, 0x4e, 0x8c, 0x19, 0xf6, 0x08, 0x9a, 0x39, 0x1c, 0xb0, 0xc5, 0x42, 0x4c, 0x63, 0xec, 0xd5,
  688. 0xc7, 0x06, 0x59, 0x3a, 0x3d, 0x70, 0x9e, 0x61, 0xd7, 0x33, 0x6c, 0x2b, 0xf8, 0xcf, 0x9c, 0x3b,
  689. 0x2d, 0xc8, 0x0f, 0x90, 0x4b, 0x86, 0x98, 0x3c, 0xc5, 0x48, 0xc3, 0xae, 0xb4, 0x09, 0x49, 0x62,
  690. 0x13, 0x64, 0x96, 0x84, 0xaa, 0x50, 0xcb, 0x2b, 0x6c, 0x23, 0x49, 0x90, 0x98, 0x22, 0x6f, 0x5a,
  691. 0x8a, 0x55, 0x85, 0x5a, 0x4e, 0xa1, 0xeb, 0x8f, 0x32, 0x3f, 0x3e, 0xaf, 0x08, 0xbf, 0x3f, 0xaf,
  692. 0x08, 0x3b, 0x5f, 0x42, 0xba, 0x69, 0xda, 0x93, 0x2f, 0xba, 0xed, 0x10, 0x28, 0x2c, 0x80, 0x52,
  693. 0x0f, 0x72, 0xfe, 0x15, 0x3d, 0x75, 0x4a, 0x8f, 0xa0, 0x49, 0xc4, 0x83, 0x3d, 0xf9, 0x6e, 0x56,
  694. 0xe4, 0xa5, 0x7a, 0x9a, 0x89, 0x5f, 0xae, 0x2b, 0x6b, 0x8a, 0x48, 0x13, 0x30, 0x53, 0xe4, 0xe0,
  695. 0x6f, 0x92, 0x90, 0xe2, 0x75, 0xb7, 0x20, 0xcd, 0x6f, 0x46, 0xcf, 0x16, 0x0f, 0x76, 0x6f, 0xe7,
  696. 0x0f, 0xae, 0xde, 0xb2, 0x2d, 0x0f, 0x5b, 0xde, 0xdc, 0xe3, 0xd9, 0x83, 0x48, 0xe9, 0x21, 0x64,
  697. 0x26, 0x53, 0x64, 0x58, 0xaa, 0xa1, 0xd1, 0x2a, 0xb3, 0x4d, 0xf1, 0xe5, 0x75, 0x25, 0xdd, 0xf2,
  698. 0x6d, 0xdd, 0xb6, 0x92, 0xa6, 0xce, 0xae, 0x26, 0xdd, 0x83, 0xd4, 0x14, 0x1b, 0xfa, 0x94, 0x94,
  699. 0xe2, 0x55, 0xa1, 0x16, 0x57, 0xf8, 0x4e, 0xfa, 0x00, 0x12, 0x7e, 0x6b, 0x4a, 0x09, 0x5a, 0x41,
  700. 0x59, 0x66, 0x7d, 0x93, 0x83, 0xbe, 0xc9, 0xa3, 0xa0, 0x6f, 0xcd, 0x8c, 0x7f, 0xf0, 0xb7, 0xbf,
  701. 0x56, 0x04, 0x85, 0x46, 0x48, 0x9f, 0x42, 0xde, 0x44, 0x1e, 0x51, 0xc7, 0x3e, 0x8f, 0xfe, 0xf1,
  702. 0x49, 0x9a, 0xa2, 0xb2, 0x8a, 0x24, 0xce, 0x77, 0xf3, 0x7f, 0x7e, 0x9e, 0x97, 0xd7, 0x15, 0xf1,
  703. 0x18, 0x79, 0x84, 0x1b, 0x15, 0xd1, 0x0c, 0x37, 0x9a, 0x54, 0x83, 0x22, 0xcd, 0x3c, 0xb1, 0x67,
  704. 0x33, 0x83, 0xa8, 0xb4, 0x3b, 0x29, 0xda, 0x9d, 0x82, 0x6f, 0x6f, 0x51, 0xf3, 0x53, 0xbf, 0x4f,
  705. 0x5b, 0x90, 0xd5, 0x10, 0x41, 0x0c, 0x92, 0xa6, 0x90, 0x8c, 0x6f, 0xa0, 0xce, 0xb7, 0x61, 0xfd,
  706. 0x0c, 0x99, 0x86, 0x86, 0x88, 0xed, 0x7a, 0x0c, 0x92, 0x61, 0x59, 0x16, 0x66, 0x0a, 0x7c, 0x17,
  707. 0x36, 0x2d, 0x7c, 0x4e, 0xd4, 0x9b, 0xe8, 0x2c, 0x45, 0x4b, 0xbe, 0xef, 0x74, 0x39, 0x62, 0x0f,
  708. 0x0a, 0x93, 0xa0, 0x23, 0x0c, 0x0b, 0x14, 0x9b, 0x0f, 0xad, 0x14, 0xf6, 0x06, 0x64, 0x90, 0xe3,
  709. 0x30, 0x80, 0x48, 0x01, 0x69, 0xe4, 0x38, 0xd4, 0xb5, 0x0f, 0x1b, 0xf4, 0x8e, 0x2e, 0xf6, 0xe6,
  710. 0x26, 0xe1, 0x49, 0x72, 0x14, 0xb3, 0xee, 0x3b, 0x14, 0x66, 0xa7, 0xd8, 0x5d, 0xc8, 0xe3, 0x33,
  711. 0x43, 0xc3, 0xd6, 0x04, 0x33, 0x5c, 0x9e, 0xe2, 0x72, 0x81, 0x91, 0x82, 0x1e, 0x41, 0xd1, 0x71,
  712. 0x6d, 0xc7, 0xf6, 0xb0, 0xab, 0x22, 0x4d, 0x73, 0xb1, 0xe7, 0x95, 0x0a, 0x2c, 0x5f, 0x60, 0x6f,
  713. 0x30, 0x73, 0x44, 0x8d, 0x8f, 0x21, 0xd1, 0x46, 0x04, 0x49, 0x45, 0x88, 0x93, 0x73, 0xaf, 0x24,
  714. 0x54, 0xe3, 0xb5, 0x9c, 0xe2, 0x2f, 0xef, 0x1a, 0x9f, 0x9d, 0x3f, 0x62, 0x90, 0x38, 0xb5, 0x09,
  715. 0x96, 0x3e, 0x84, 0x84, 0xdf, 0x53, 0x2a, 0xdb, 0xc2, 0xea, 0xb1, 0x18, 0x1a, 0xba, 0x85, 0xb5,
  716. 0x13, 0x4f, 0x1f, 0x5d, 0x38, 0x58, 0xa1, 0x21, 0x11, 0x1d, 0xc6, 0x96, 0x74, 0xb8, 0x09, 0x49,
  717. 0xd7, 0x9e, 0x5b, 0x1a, 0x95, 0x67, 0x52, 0x61, 0x1b, 0xe9, 0x08, 0x32, 0xa1, 0xbc, 0x12, 0xaf,
  718. 0x26, 0xaf, 0x75, 0x2e, 0xaf, 0x60, 0xbe, 0x95, 0xf4, 0x98, 0xcb, 0xaa, 0x09, 0xd9, 0xf0, 0x2b,
  719. 0xc4, 0xc5, 0xfa, 0x6a, 0x7a, 0x5f, 0x84, 0x49, 0xef, 0xc0, 0x46, 0xa8, 0x92, 0x90, 0x66, 0xa6,
  720. 0xcd, 0x62, 0xe8, 0xe0, 0x3c, 0x2f, 0x09, 0x50, 0x35, 0x2c, 0x0d, 0x9f, 0x53, 0x8d, 0xe6, 0x23,
  721. 0x02, 0xec, 0xfa, 0x56, 0xe9, 0x4d, 0xc8, 0x7a, 0x86, 0x6e, 0x21, 0x32, 0x77, 0x31, 0xd7, 0xe8,
  722. 0xc2, 0xb0, 0xf3, 0x22, 0x06, 0x29, 0xa6, 0xf9, 0x08, 0x7b, 0xc2, 0xdd, 0xec, 0xc5, 0x56, 0xb1,
  723. 0x17, 0xff, 0xb7, 0xec, 0x1d, 0x02, 0x84, 0x25, 0x79, 0xa5, 0x44, 0x35, 0x5e, 0x13, 0x0f, 0x1e,
  724. 0xac, 0x4a, 0xc7, 0xca, 0x1d, 0x1a, 0x3a, 0xff, 0x5c, 0x45, 0x42, 0x43, 0x65, 0x25, 0x23, 0xdf,
  725. 0xdb, 0x06, 0x64, 0xc7, 0x06, 0x51, 0x91, 0xeb, 0xa2, 0x0b, 0x4a, 0xa7, 0x78, 0xf0, 0xd6, 0xed,
  726. 0xdc, 0xfe, 0x63, 0x21, 0xfb, 0x8f, 0x85, 0xdc, 0x34, 0x48, 0xc3, 0xc7, 0x2a, 0x99, 0x31, 0x5f,
  727. 0xed, 0xfc, 0x26, 0x40, 0x36, 0x3c, 0x56, 0x3a, 0x84, 0x7c, 0x70, 0x75, 0xf5, 0x99, 0x89, 0x74,
  728. 0x2e, 0xd5, 0xdd, 0xbf, 0xb9, 0xff, 0x13, 0x13, 0xe9, 0x8a, 0xc8, 0xaf, 0xec, 0x6f, 0xee, 0x6e,
  729. 0x78, 0x6c, 0x45, 0xc3, 0x97, 0x14, 0x16, 0xff, 0x67, 0x0a, 0x5b, 0xd2, 0x42, 0xe2, 0xa6, 0x16,
  730. 0x7e, 0x8a, 0x41, 0x66, 0x40, 0xc7, 0x19, 0x99, 0xff, 0xdd, 0x18, 0x6e, 0x41, 0xd6, 0xb1, 0x4d,
  731. 0x95, 0x79, 0x12, 0xd4, 0x93, 0x71, 0x6c, 0x53, 0xb9, 0xa5, 0xb2, 0xe4, 0x6b, 0x9d, 0xd1, 0xd4,
  732. 0x6b, 0x60, 0x30, 0x7d, 0x93, 0xc1, 0xaf, 0x20, 0xc7, 0x08, 0xe1, 0xaf, 0xf0, 0xfb, 0x3e, 0x13,
  733. 0xf4, 0x91, 0x67, 0x8f, 0xf0, 0xf6, 0xaa, 0xe2, 0x19, 0x5e, 0xe1, 0x68, 0x3f, 0x8e, 0xbd, 0x4f,
  734. 0xfc, 0xc7, 0xc1, 0xf6, 0x5f, 0xcf, 0x82, 0xc2, 0xd1, 0xfb, 0x3f, 0x0b, 0x20, 0x46, 0xd4, 0x26,
  735. 0x95, 0xe1, 0x5e, 0xf3, 0xb8, 0xdf, 0x3a, 0x6a, 0xab, 0xdd, 0xb6, 0xfa, 0xe4, 0xb8, 0x71, 0xa8,
  736. 0x7e, 0xdc, 0x3b, 0xea, 0xf5, 0x3f, 0xe9, 0x15, 0xd7, 0xa4, 0x3a, 0x6c, 0x52, 0x5f, 0xe8, 0x6a,
  737. 0x34, 0x87, 0x9d, 0xde, 0xa8, 0x28, 0x94, 0xff, 0x7f, 0x79, 0x55, 0xdd, 0x88, 0xa4, 0x69, 0x8c,
  738. 0x3d, 0x6c, 0x91, 0xdb, 0x01, 0xad, 0xfe, 0xc9, 0x49, 0x77, 0x54, 0x8c, 0xdd, 0x0a, 0xe0, 0x1f,
  739. 0x94, 0x47, 0xb0, 0xb1, 0x1c, 0xd0, 0xeb, 0x1e, 0x17, 0xe3, 0x65, 0xe9, 0xf2, 0xaa, 0x5a, 0x88,
  740. 0xa0, 0x7b, 0x86, 0x59, 0xce, 0x7c, 0xfd, 0x62, 0x7b, 0xed, 0x87, 0xef, 0xb6, 0xd7, 0xf6, 0xbf,
  741. 0x17, 0x20, 0xbf, 0x24, 0x2a, 0x69, 0x0b, 0xee, 0x0f, 0xbb, 0x87, 0xbd, 0x4e, 0x5b, 0x3d, 0x19,
  742. 0x1e, 0xaa, 0xa3, 0xcf, 0x06, 0x9d, 0xc8, 0x2d, 0x1e, 0x40, 0x6e, 0xa0, 0x74, 0x4e, 0xfb, 0xa3,
  743. 0x0e, 0xf5, 0x14, 0x85, 0xf2, 0xfa, 0xe5, 0x55, 0x55, 0x1c, 0xb8, 0xf8, 0xcc, 0x26, 0x98, 0xc6,
  744. 0xef, 0x41, 0x61, 0xa0, 0x74, 0x58, 0xb1, 0x0c, 0x14, 0x2b, 0x6f, 0x5c, 0x5e, 0x55, 0xf3, 0x03,
  745. 0x17, 0x33, 0xde, 0x28, 0x6c, 0x17, 0xf2, 0x03, 0xa5, 0x3f, 0xe8, 0x0f, 0x1b, 0xc7, 0x0c, 0x15,
  746. 0x2f, 0x17, 0x2f, 0xaf, 0xaa, 0xb9, 0x60, 0x22, 0x7c, 0xd0, 0xa2, 0xce, 0xa6, 0xfc, 0xf9, 0x63,
  747. 0xdd, 0x20, 0xd3, 0xf9, 0x58, 0x9e, 0xd8, 0xb3, 0xfa, 0xa2, 0x3d, 0xd1, 0x65, 0xe4, 0x07, 0xf0,
  748. 0x38, 0x45, 0x37, 0xef, 0xfd, 0x19, 0x00, 0x00, 0xff, 0xff, 0x58, 0xa5, 0x4c, 0x86, 0x16, 0x0b,
  749. 0x00, 0x00,
  750. }
  751. func (this *PartSetHeader) Equal(that interface{}) bool {
  752. if that == nil {
  753. return this == nil
  754. }
  755. that1, ok := that.(*PartSetHeader)
  756. if !ok {
  757. that2, ok := that.(PartSetHeader)
  758. if ok {
  759. that1 = &that2
  760. } else {
  761. return false
  762. }
  763. }
  764. if that1 == nil {
  765. return this == nil
  766. } else if this == nil {
  767. return false
  768. }
  769. if this.Total != that1.Total {
  770. return false
  771. }
  772. if !bytes.Equal(this.Hash, that1.Hash) {
  773. return false
  774. }
  775. if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
  776. return false
  777. }
  778. return true
  779. }
  780. func (this *BlockID) Equal(that interface{}) bool {
  781. if that == nil {
  782. return this == nil
  783. }
  784. that1, ok := that.(*BlockID)
  785. if !ok {
  786. that2, ok := that.(BlockID)
  787. if ok {
  788. that1 = &that2
  789. } else {
  790. return false
  791. }
  792. }
  793. if that1 == nil {
  794. return this == nil
  795. } else if this == nil {
  796. return false
  797. }
  798. if !bytes.Equal(this.Hash, that1.Hash) {
  799. return false
  800. }
  801. if !this.PartsHeader.Equal(&that1.PartsHeader) {
  802. return false
  803. }
  804. if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
  805. return false
  806. }
  807. return true
  808. }
  809. func (this *Header) Equal(that interface{}) bool {
  810. if that == nil {
  811. return this == nil
  812. }
  813. that1, ok := that.(*Header)
  814. if !ok {
  815. that2, ok := that.(Header)
  816. if ok {
  817. that1 = &that2
  818. } else {
  819. return false
  820. }
  821. }
  822. if that1 == nil {
  823. return this == nil
  824. } else if this == nil {
  825. return false
  826. }
  827. if !this.Version.Equal(&that1.Version) {
  828. return false
  829. }
  830. if this.ChainID != that1.ChainID {
  831. return false
  832. }
  833. if this.Height != that1.Height {
  834. return false
  835. }
  836. if !this.Time.Equal(that1.Time) {
  837. return false
  838. }
  839. if !this.LastBlockID.Equal(&that1.LastBlockID) {
  840. return false
  841. }
  842. if !bytes.Equal(this.LastCommitHash, that1.LastCommitHash) {
  843. return false
  844. }
  845. if !bytes.Equal(this.DataHash, that1.DataHash) {
  846. return false
  847. }
  848. if !bytes.Equal(this.ValidatorsHash, that1.ValidatorsHash) {
  849. return false
  850. }
  851. if !bytes.Equal(this.NextValidatorsHash, that1.NextValidatorsHash) {
  852. return false
  853. }
  854. if !bytes.Equal(this.ConsensusHash, that1.ConsensusHash) {
  855. return false
  856. }
  857. if !bytes.Equal(this.AppHash, that1.AppHash) {
  858. return false
  859. }
  860. if !bytes.Equal(this.LastResultsHash, that1.LastResultsHash) {
  861. return false
  862. }
  863. if !bytes.Equal(this.EvidenceHash, that1.EvidenceHash) {
  864. return false
  865. }
  866. if !bytes.Equal(this.ProposerAddress, that1.ProposerAddress) {
  867. return false
  868. }
  869. if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
  870. return false
  871. }
  872. return true
  873. }
  874. func NewPopulatedPartSetHeader(r randyTypes, easy bool) *PartSetHeader {
  875. this := &PartSetHeader{}
  876. this.Total = uint32(r.Uint32())
  877. v1 := r.Intn(100)
  878. this.Hash = make([]byte, v1)
  879. for i := 0; i < v1; i++ {
  880. this.Hash[i] = byte(r.Intn(256))
  881. }
  882. if !easy && r.Intn(10) != 0 {
  883. this.XXX_unrecognized = randUnrecognizedTypes(r, 3)
  884. }
  885. return this
  886. }
  887. func NewPopulatedBlockID(r randyTypes, easy bool) *BlockID {
  888. this := &BlockID{}
  889. v2 := r.Intn(100)
  890. this.Hash = make([]byte, v2)
  891. for i := 0; i < v2; i++ {
  892. this.Hash[i] = byte(r.Intn(256))
  893. }
  894. v3 := NewPopulatedPartSetHeader(r, easy)
  895. this.PartsHeader = *v3
  896. if !easy && r.Intn(10) != 0 {
  897. this.XXX_unrecognized = randUnrecognizedTypes(r, 3)
  898. }
  899. return this
  900. }
  901. func NewPopulatedHeader(r randyTypes, easy bool) *Header {
  902. this := &Header{}
  903. v4 := version.NewPopulatedConsensus(r, easy)
  904. this.Version = *v4
  905. this.ChainID = string(randStringTypes(r))
  906. this.Height = int64(r.Int63())
  907. if r.Intn(2) == 0 {
  908. this.Height *= -1
  909. }
  910. v5 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy)
  911. this.Time = *v5
  912. v6 := NewPopulatedBlockID(r, easy)
  913. this.LastBlockID = *v6
  914. v7 := r.Intn(100)
  915. this.LastCommitHash = make([]byte, v7)
  916. for i := 0; i < v7; i++ {
  917. this.LastCommitHash[i] = byte(r.Intn(256))
  918. }
  919. v8 := r.Intn(100)
  920. this.DataHash = make([]byte, v8)
  921. for i := 0; i < v8; i++ {
  922. this.DataHash[i] = byte(r.Intn(256))
  923. }
  924. v9 := r.Intn(100)
  925. this.ValidatorsHash = make([]byte, v9)
  926. for i := 0; i < v9; i++ {
  927. this.ValidatorsHash[i] = byte(r.Intn(256))
  928. }
  929. v10 := r.Intn(100)
  930. this.NextValidatorsHash = make([]byte, v10)
  931. for i := 0; i < v10; i++ {
  932. this.NextValidatorsHash[i] = byte(r.Intn(256))
  933. }
  934. v11 := r.Intn(100)
  935. this.ConsensusHash = make([]byte, v11)
  936. for i := 0; i < v11; i++ {
  937. this.ConsensusHash[i] = byte(r.Intn(256))
  938. }
  939. v12 := r.Intn(100)
  940. this.AppHash = make([]byte, v12)
  941. for i := 0; i < v12; i++ {
  942. this.AppHash[i] = byte(r.Intn(256))
  943. }
  944. v13 := r.Intn(100)
  945. this.LastResultsHash = make([]byte, v13)
  946. for i := 0; i < v13; i++ {
  947. this.LastResultsHash[i] = byte(r.Intn(256))
  948. }
  949. v14 := r.Intn(100)
  950. this.EvidenceHash = make([]byte, v14)
  951. for i := 0; i < v14; i++ {
  952. this.EvidenceHash[i] = byte(r.Intn(256))
  953. }
  954. v15 := r.Intn(100)
  955. this.ProposerAddress = make([]byte, v15)
  956. for i := 0; i < v15; i++ {
  957. this.ProposerAddress[i] = byte(r.Intn(256))
  958. }
  959. if !easy && r.Intn(10) != 0 {
  960. this.XXX_unrecognized = randUnrecognizedTypes(r, 15)
  961. }
  962. return this
  963. }
  964. type randyTypes interface {
  965. Float32() float32
  966. Float64() float64
  967. Int63() int64
  968. Int31() int32
  969. Uint32() uint32
  970. Intn(n int) int
  971. }
  972. func randUTF8RuneTypes(r randyTypes) rune {
  973. ru := r.Intn(62)
  974. if ru < 10 {
  975. return rune(ru + 48)
  976. } else if ru < 36 {
  977. return rune(ru + 55)
  978. }
  979. return rune(ru + 61)
  980. }
  981. func randStringTypes(r randyTypes) string {
  982. v16 := r.Intn(100)
  983. tmps := make([]rune, v16)
  984. for i := 0; i < v16; i++ {
  985. tmps[i] = randUTF8RuneTypes(r)
  986. }
  987. return string(tmps)
  988. }
  989. func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) {
  990. l := r.Intn(5)
  991. for i := 0; i < l; i++ {
  992. wire := r.Intn(4)
  993. if wire == 3 {
  994. wire = 5
  995. }
  996. fieldNumber := maxFieldNumber + r.Intn(100)
  997. dAtA = randFieldTypes(dAtA, r, fieldNumber, wire)
  998. }
  999. return dAtA
  1000. }
  1001. func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte {
  1002. key := uint32(fieldNumber)<<3 | uint32(wire)
  1003. switch wire {
  1004. case 0:
  1005. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  1006. v17 := r.Int63()
  1007. if r.Intn(2) == 0 {
  1008. v17 *= -1
  1009. }
  1010. dAtA = encodeVarintPopulateTypes(dAtA, uint64(v17))
  1011. case 1:
  1012. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  1013. 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)))
  1014. case 2:
  1015. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  1016. ll := r.Intn(100)
  1017. dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll))
  1018. for j := 0; j < ll; j++ {
  1019. dAtA = append(dAtA, byte(r.Intn(256)))
  1020. }
  1021. default:
  1022. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  1023. dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
  1024. }
  1025. return dAtA
  1026. }
  1027. func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte {
  1028. for v >= 1<<7 {
  1029. dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
  1030. v >>= 7
  1031. }
  1032. dAtA = append(dAtA, uint8(v))
  1033. return dAtA
  1034. }