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.

1938 lines
48 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: proto/state/types.proto
  3. package state
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. _ "github.com/gogo/protobuf/types"
  9. github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
  10. types "github.com/tendermint/tendermint/abci/types"
  11. types1 "github.com/tendermint/tendermint/proto/types"
  12. version "github.com/tendermint/tendermint/proto/version"
  13. io "io"
  14. math "math"
  15. math_bits "math/bits"
  16. time "time"
  17. )
  18. // Reference imports to suppress errors if they are not otherwise used.
  19. var _ = proto.Marshal
  20. var _ = fmt.Errorf
  21. var _ = math.Inf
  22. var _ = time.Kitchen
  23. // This is a compile-time assertion to ensure that this generated file
  24. // is compatible with the proto package it is being compiled against.
  25. // A compilation error at this line likely means your copy of the
  26. // proto package needs to be updated.
  27. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  28. // ABCIResponses retains the responses
  29. // of the various ABCI calls during block processing.
  30. // It is persisted to disk for each height before calling Commit.
  31. type ABCIResponses struct {
  32. DeliverTxs []*types.ResponseDeliverTx `protobuf:"bytes,1,rep,name=deliver_txs,json=deliverTxs,proto3" json:"deliver_txs,omitempty"`
  33. EndBlock *types.ResponseEndBlock `protobuf:"bytes,2,opt,name=end_block,json=endBlock,proto3" json:"end_block,omitempty"`
  34. BeginBlock *types.ResponseBeginBlock `protobuf:"bytes,3,opt,name=begin_block,json=beginBlock,proto3" json:"begin_block,omitempty"`
  35. }
  36. func (m *ABCIResponses) Reset() { *m = ABCIResponses{} }
  37. func (m *ABCIResponses) String() string { return proto.CompactTextString(m) }
  38. func (*ABCIResponses) ProtoMessage() {}
  39. func (*ABCIResponses) Descriptor() ([]byte, []int) {
  40. return fileDescriptor_00e69fef8162ea9b, []int{0}
  41. }
  42. func (m *ABCIResponses) XXX_Unmarshal(b []byte) error {
  43. return m.Unmarshal(b)
  44. }
  45. func (m *ABCIResponses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  46. if deterministic {
  47. return xxx_messageInfo_ABCIResponses.Marshal(b, m, deterministic)
  48. } else {
  49. b = b[:cap(b)]
  50. n, err := m.MarshalToSizedBuffer(b)
  51. if err != nil {
  52. return nil, err
  53. }
  54. return b[:n], nil
  55. }
  56. }
  57. func (m *ABCIResponses) XXX_Merge(src proto.Message) {
  58. xxx_messageInfo_ABCIResponses.Merge(m, src)
  59. }
  60. func (m *ABCIResponses) XXX_Size() int {
  61. return m.Size()
  62. }
  63. func (m *ABCIResponses) XXX_DiscardUnknown() {
  64. xxx_messageInfo_ABCIResponses.DiscardUnknown(m)
  65. }
  66. var xxx_messageInfo_ABCIResponses proto.InternalMessageInfo
  67. func (m *ABCIResponses) GetDeliverTxs() []*types.ResponseDeliverTx {
  68. if m != nil {
  69. return m.DeliverTxs
  70. }
  71. return nil
  72. }
  73. func (m *ABCIResponses) GetEndBlock() *types.ResponseEndBlock {
  74. if m != nil {
  75. return m.EndBlock
  76. }
  77. return nil
  78. }
  79. func (m *ABCIResponses) GetBeginBlock() *types.ResponseBeginBlock {
  80. if m != nil {
  81. return m.BeginBlock
  82. }
  83. return nil
  84. }
  85. // ValidatorsInfo represents the latest validator set, or the last height it changed
  86. type ValidatorsInfo struct {
  87. ValidatorSet *types1.ValidatorSet `protobuf:"bytes,1,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"`
  88. LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"`
  89. }
  90. func (m *ValidatorsInfo) Reset() { *m = ValidatorsInfo{} }
  91. func (m *ValidatorsInfo) String() string { return proto.CompactTextString(m) }
  92. func (*ValidatorsInfo) ProtoMessage() {}
  93. func (*ValidatorsInfo) Descriptor() ([]byte, []int) {
  94. return fileDescriptor_00e69fef8162ea9b, []int{1}
  95. }
  96. func (m *ValidatorsInfo) XXX_Unmarshal(b []byte) error {
  97. return m.Unmarshal(b)
  98. }
  99. func (m *ValidatorsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  100. if deterministic {
  101. return xxx_messageInfo_ValidatorsInfo.Marshal(b, m, deterministic)
  102. } else {
  103. b = b[:cap(b)]
  104. n, err := m.MarshalToSizedBuffer(b)
  105. if err != nil {
  106. return nil, err
  107. }
  108. return b[:n], nil
  109. }
  110. }
  111. func (m *ValidatorsInfo) XXX_Merge(src proto.Message) {
  112. xxx_messageInfo_ValidatorsInfo.Merge(m, src)
  113. }
  114. func (m *ValidatorsInfo) XXX_Size() int {
  115. return m.Size()
  116. }
  117. func (m *ValidatorsInfo) XXX_DiscardUnknown() {
  118. xxx_messageInfo_ValidatorsInfo.DiscardUnknown(m)
  119. }
  120. var xxx_messageInfo_ValidatorsInfo proto.InternalMessageInfo
  121. func (m *ValidatorsInfo) GetValidatorSet() *types1.ValidatorSet {
  122. if m != nil {
  123. return m.ValidatorSet
  124. }
  125. return nil
  126. }
  127. func (m *ValidatorsInfo) GetLastHeightChanged() int64 {
  128. if m != nil {
  129. return m.LastHeightChanged
  130. }
  131. return 0
  132. }
  133. // ConsensusParamsInfo represents the latest consensus params, or the last height it changed
  134. type ConsensusParamsInfo struct {
  135. ConsensusParams types1.ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"`
  136. LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"`
  137. }
  138. func (m *ConsensusParamsInfo) Reset() { *m = ConsensusParamsInfo{} }
  139. func (m *ConsensusParamsInfo) String() string { return proto.CompactTextString(m) }
  140. func (*ConsensusParamsInfo) ProtoMessage() {}
  141. func (*ConsensusParamsInfo) Descriptor() ([]byte, []int) {
  142. return fileDescriptor_00e69fef8162ea9b, []int{2}
  143. }
  144. func (m *ConsensusParamsInfo) XXX_Unmarshal(b []byte) error {
  145. return m.Unmarshal(b)
  146. }
  147. func (m *ConsensusParamsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  148. if deterministic {
  149. return xxx_messageInfo_ConsensusParamsInfo.Marshal(b, m, deterministic)
  150. } else {
  151. b = b[:cap(b)]
  152. n, err := m.MarshalToSizedBuffer(b)
  153. if err != nil {
  154. return nil, err
  155. }
  156. return b[:n], nil
  157. }
  158. }
  159. func (m *ConsensusParamsInfo) XXX_Merge(src proto.Message) {
  160. xxx_messageInfo_ConsensusParamsInfo.Merge(m, src)
  161. }
  162. func (m *ConsensusParamsInfo) XXX_Size() int {
  163. return m.Size()
  164. }
  165. func (m *ConsensusParamsInfo) XXX_DiscardUnknown() {
  166. xxx_messageInfo_ConsensusParamsInfo.DiscardUnknown(m)
  167. }
  168. var xxx_messageInfo_ConsensusParamsInfo proto.InternalMessageInfo
  169. func (m *ConsensusParamsInfo) GetConsensusParams() types1.ConsensusParams {
  170. if m != nil {
  171. return m.ConsensusParams
  172. }
  173. return types1.ConsensusParams{}
  174. }
  175. func (m *ConsensusParamsInfo) GetLastHeightChanged() int64 {
  176. if m != nil {
  177. return m.LastHeightChanged
  178. }
  179. return 0
  180. }
  181. type Version struct {
  182. Consensus version.Consensus `protobuf:"bytes,1,opt,name=consensus,proto3" json:"consensus"`
  183. Software string `protobuf:"bytes,2,opt,name=software,proto3" json:"software,omitempty"`
  184. }
  185. func (m *Version) Reset() { *m = Version{} }
  186. func (m *Version) String() string { return proto.CompactTextString(m) }
  187. func (*Version) ProtoMessage() {}
  188. func (*Version) Descriptor() ([]byte, []int) {
  189. return fileDescriptor_00e69fef8162ea9b, []int{3}
  190. }
  191. func (m *Version) XXX_Unmarshal(b []byte) error {
  192. return m.Unmarshal(b)
  193. }
  194. func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  195. if deterministic {
  196. return xxx_messageInfo_Version.Marshal(b, m, deterministic)
  197. } else {
  198. b = b[:cap(b)]
  199. n, err := m.MarshalToSizedBuffer(b)
  200. if err != nil {
  201. return nil, err
  202. }
  203. return b[:n], nil
  204. }
  205. }
  206. func (m *Version) XXX_Merge(src proto.Message) {
  207. xxx_messageInfo_Version.Merge(m, src)
  208. }
  209. func (m *Version) XXX_Size() int {
  210. return m.Size()
  211. }
  212. func (m *Version) XXX_DiscardUnknown() {
  213. xxx_messageInfo_Version.DiscardUnknown(m)
  214. }
  215. var xxx_messageInfo_Version proto.InternalMessageInfo
  216. func (m *Version) GetConsensus() version.Consensus {
  217. if m != nil {
  218. return m.Consensus
  219. }
  220. return version.Consensus{}
  221. }
  222. func (m *Version) GetSoftware() string {
  223. if m != nil {
  224. return m.Software
  225. }
  226. return ""
  227. }
  228. type State struct {
  229. Version Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
  230. // immutable
  231. ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
  232. // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist)
  233. LastBlockHeight int64 `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
  234. LastBlockID types1.BlockID `protobuf:"bytes,4,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"`
  235. LastBlockTime time.Time `protobuf:"bytes,5,opt,name=last_block_time,json=lastBlockTime,proto3,stdtime" json:"last_block_time"`
  236. // LastValidators is used to validate block.LastCommit.
  237. // Validators are persisted to the database separately every time they change,
  238. // so we can query for historical validator sets.
  239. // Note that if s.LastBlockHeight causes a valset change,
  240. // we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1
  241. // Extra +1 due to nextValSet delay.
  242. NextValidators *types1.ValidatorSet `protobuf:"bytes,6,opt,name=next_validators,json=nextValidators,proto3" json:"next_validators,omitempty"`
  243. Validators *types1.ValidatorSet `protobuf:"bytes,7,opt,name=validators,proto3" json:"validators,omitempty"`
  244. LastValidators *types1.ValidatorSet `protobuf:"bytes,8,opt,name=last_validators,json=lastValidators,proto3" json:"last_validators,omitempty"`
  245. LastHeightValidatorsChanged int64 `protobuf:"varint,9,opt,name=last_height_validators_changed,json=lastHeightValidatorsChanged,proto3" json:"last_height_validators_changed,omitempty"`
  246. // Consensus parameters used for validating blocks.
  247. // Changes returned by EndBlock and updated after Commit.
  248. ConsensusParams types1.ConsensusParams `protobuf:"bytes,10,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"`
  249. LastHeightConsensusParamsChanged int64 `protobuf:"varint,11,opt,name=last_height_consensus_params_changed,json=lastHeightConsensusParamsChanged,proto3" json:"last_height_consensus_params_changed,omitempty"`
  250. // Merkle root of the results from executing prev block
  251. LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"`
  252. // the latest AppHash we've received from calling abci.Commit()
  253. AppHash []byte `protobuf:"bytes,13,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
  254. }
  255. func (m *State) Reset() { *m = State{} }
  256. func (m *State) String() string { return proto.CompactTextString(m) }
  257. func (*State) ProtoMessage() {}
  258. func (*State) Descriptor() ([]byte, []int) {
  259. return fileDescriptor_00e69fef8162ea9b, []int{4}
  260. }
  261. func (m *State) XXX_Unmarshal(b []byte) error {
  262. return m.Unmarshal(b)
  263. }
  264. func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  265. if deterministic {
  266. return xxx_messageInfo_State.Marshal(b, m, deterministic)
  267. } else {
  268. b = b[:cap(b)]
  269. n, err := m.MarshalToSizedBuffer(b)
  270. if err != nil {
  271. return nil, err
  272. }
  273. return b[:n], nil
  274. }
  275. }
  276. func (m *State) XXX_Merge(src proto.Message) {
  277. xxx_messageInfo_State.Merge(m, src)
  278. }
  279. func (m *State) XXX_Size() int {
  280. return m.Size()
  281. }
  282. func (m *State) XXX_DiscardUnknown() {
  283. xxx_messageInfo_State.DiscardUnknown(m)
  284. }
  285. var xxx_messageInfo_State proto.InternalMessageInfo
  286. func (m *State) GetVersion() Version {
  287. if m != nil {
  288. return m.Version
  289. }
  290. return Version{}
  291. }
  292. func (m *State) GetChainID() string {
  293. if m != nil {
  294. return m.ChainID
  295. }
  296. return ""
  297. }
  298. func (m *State) GetLastBlockHeight() int64 {
  299. if m != nil {
  300. return m.LastBlockHeight
  301. }
  302. return 0
  303. }
  304. func (m *State) GetLastBlockID() types1.BlockID {
  305. if m != nil {
  306. return m.LastBlockID
  307. }
  308. return types1.BlockID{}
  309. }
  310. func (m *State) GetLastBlockTime() time.Time {
  311. if m != nil {
  312. return m.LastBlockTime
  313. }
  314. return time.Time{}
  315. }
  316. func (m *State) GetNextValidators() *types1.ValidatorSet {
  317. if m != nil {
  318. return m.NextValidators
  319. }
  320. return nil
  321. }
  322. func (m *State) GetValidators() *types1.ValidatorSet {
  323. if m != nil {
  324. return m.Validators
  325. }
  326. return nil
  327. }
  328. func (m *State) GetLastValidators() *types1.ValidatorSet {
  329. if m != nil {
  330. return m.LastValidators
  331. }
  332. return nil
  333. }
  334. func (m *State) GetLastHeightValidatorsChanged() int64 {
  335. if m != nil {
  336. return m.LastHeightValidatorsChanged
  337. }
  338. return 0
  339. }
  340. func (m *State) GetConsensusParams() types1.ConsensusParams {
  341. if m != nil {
  342. return m.ConsensusParams
  343. }
  344. return types1.ConsensusParams{}
  345. }
  346. func (m *State) GetLastHeightConsensusParamsChanged() int64 {
  347. if m != nil {
  348. return m.LastHeightConsensusParamsChanged
  349. }
  350. return 0
  351. }
  352. func (m *State) GetLastResultsHash() []byte {
  353. if m != nil {
  354. return m.LastResultsHash
  355. }
  356. return nil
  357. }
  358. func (m *State) GetAppHash() []byte {
  359. if m != nil {
  360. return m.AppHash
  361. }
  362. return nil
  363. }
  364. func init() {
  365. proto.RegisterType((*ABCIResponses)(nil), "tendermint.state.ABCIResponses")
  366. proto.RegisterType((*ValidatorsInfo)(nil), "tendermint.state.ValidatorsInfo")
  367. proto.RegisterType((*ConsensusParamsInfo)(nil), "tendermint.state.ConsensusParamsInfo")
  368. proto.RegisterType((*Version)(nil), "tendermint.state.Version")
  369. proto.RegisterType((*State)(nil), "tendermint.state.State")
  370. }
  371. func init() { proto.RegisterFile("proto/state/types.proto", fileDescriptor_00e69fef8162ea9b) }
  372. var fileDescriptor_00e69fef8162ea9b = []byte{
  373. // 755 bytes of a gzipped FileDescriptorProto
  374. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x6e, 0xd3, 0x4a,
  375. 0x18, 0x8d, 0x6f, 0xda, 0x26, 0x19, 0x37, 0x4d, 0xef, 0x54, 0xba, 0xd7, 0x4d, 0x85, 0x13, 0x22,
  376. 0x54, 0x02, 0x42, 0x8e, 0x54, 0x56, 0x6c, 0x90, 0xea, 0x04, 0xa8, 0x51, 0x85, 0x90, 0x5b, 0x75,
  377. 0xc1, 0xc6, 0x9a, 0xc4, 0x53, 0xdb, 0x22, 0xb1, 0x2d, 0xcf, 0x24, 0xb4, 0x0f, 0xc0, 0xbe, 0x5b,
  378. 0x5e, 0x85, 0x27, 0xe8, 0xb2, 0x4b, 0x56, 0x05, 0xa5, 0x5b, 0x1e, 0x02, 0xcd, 0x8c, 0x7f, 0x26,
  379. 0x29, 0x52, 0x8b, 0x58, 0x65, 0xfc, 0x9d, 0x39, 0x67, 0xce, 0x37, 0x73, 0x3e, 0x05, 0xfc, 0x1f,
  380. 0x27, 0x11, 0x8d, 0x7a, 0x84, 0x22, 0x8a, 0x7b, 0xf4, 0x3c, 0xc6, 0xc4, 0xe0, 0x15, 0xb8, 0x49,
  381. 0x71, 0xe8, 0xe2, 0x64, 0x12, 0x84, 0xd4, 0xe0, 0x68, 0x73, 0x97, 0xfa, 0x41, 0xe2, 0x3a, 0x31,
  382. 0x4a, 0xe8, 0x79, 0x4f, 0xd0, 0xbc, 0xc8, 0x8b, 0x8a, 0x95, 0x60, 0x36, 0xff, 0x13, 0x15, 0x34,
  383. 0x1c, 0x05, 0xb2, 0x62, 0x33, 0x3d, 0x8a, 0x97, 0x16, 0x80, 0x1d, 0x19, 0x98, 0xa1, 0x71, 0xe0,
  384. 0x22, 0x1a, 0x25, 0x29, 0xa8, 0xc9, 0x60, 0x8c, 0x12, 0x34, 0x59, 0xa2, 0xcd, 0x70, 0x42, 0x82,
  385. 0x28, 0xcc, 0x7e, 0x53, 0xb0, 0xe5, 0x45, 0x91, 0x37, 0xc6, 0xc2, 0xe7, 0x70, 0x7a, 0xda, 0xa3,
  386. 0xc1, 0x04, 0x13, 0x8a, 0x26, 0xb1, 0xd8, 0xd0, 0xf9, 0xa9, 0x80, 0xfa, 0xbe, 0xd9, 0xb7, 0x6c,
  387. 0x4c, 0xe2, 0x28, 0x24, 0x98, 0x40, 0x0b, 0xa8, 0x2e, 0x1e, 0x07, 0x33, 0x9c, 0x38, 0xf4, 0x8c,
  388. 0x68, 0x4a, 0xbb, 0xdc, 0x55, 0xf7, 0xba, 0x86, 0x74, 0x0f, 0xac, 0x25, 0x43, 0x38, 0xcf, 0x68,
  389. 0x03, 0xc1, 0x38, 0x3e, 0xb3, 0x81, 0x9b, 0x2d, 0x09, 0x1c, 0x80, 0x1a, 0x0e, 0x5d, 0x67, 0x38,
  390. 0x8e, 0x46, 0x1f, 0xb5, 0x7f, 0xda, 0x4a, 0x57, 0xdd, 0x7b, 0x7c, 0x87, 0xd0, 0xab, 0xd0, 0x35,
  391. 0xd9, 0x76, 0xbb, 0x8a, 0xd3, 0x15, 0x7c, 0x0b, 0xd4, 0x21, 0xf6, 0x82, 0x30, 0xd5, 0x29, 0x73,
  392. 0x9d, 0x27, 0x77, 0xe8, 0x98, 0x8c, 0x21, 0x94, 0xc0, 0x30, 0x5f, 0x77, 0x3e, 0x2b, 0x60, 0xe3,
  393. 0x24, 0xbb, 0x5a, 0x62, 0x85, 0xa7, 0x11, 0xec, 0x83, 0x7a, 0x7e, 0xd9, 0x0e, 0xc1, 0x54, 0x53,
  394. 0xf8, 0x01, 0xba, 0x7c, 0x80, 0xd0, 0xce, 0x89, 0x47, 0x98, 0xda, 0xeb, 0x33, 0xe9, 0x0b, 0x1a,
  395. 0x60, 0x6b, 0x8c, 0x08, 0x75, 0x7c, 0x1c, 0x78, 0x3e, 0x75, 0x46, 0x3e, 0x0a, 0x3d, 0xec, 0xf2,
  396. 0x9e, 0xcb, 0xf6, 0xbf, 0x0c, 0x3a, 0xe0, 0x48, 0x5f, 0x00, 0x9d, 0x2f, 0x0a, 0xd8, 0xea, 0x33,
  397. 0x9f, 0x21, 0x99, 0x92, 0xf7, 0xfc, 0x39, 0xb9, 0x19, 0x1b, 0x6c, 0x8e, 0xb2, 0xb2, 0x23, 0x9e,
  398. 0x39, 0xf5, 0xf3, 0xf0, 0xb6, 0x9f, 0x25, 0x01, 0x73, 0xe5, 0xf2, 0xba, 0x55, 0xb2, 0x1b, 0xa3,
  399. 0xc5, 0xf2, 0x1f, 0x7b, 0xf3, 0x41, 0xe5, 0x44, 0x84, 0x08, 0xee, 0x83, 0x5a, 0xae, 0x96, 0xfa,
  400. 0x78, 0x20, 0xfb, 0xc8, 0xc2, 0x96, 0x3b, 0x49, 0x3d, 0x14, 0x2c, 0xd8, 0x04, 0x55, 0x12, 0x9d,
  401. 0xd2, 0x4f, 0x28, 0xc1, 0xfc, 0xc8, 0x9a, 0x9d, 0x7f, 0x77, 0xbe, 0xae, 0x81, 0xd5, 0x23, 0x36,
  402. 0x54, 0xf0, 0x05, 0xa8, 0xa4, 0x5a, 0xe9, 0x31, 0xdb, 0xc6, 0xf2, 0xe0, 0x19, 0xa9, 0xa9, 0xf4,
  403. 0x88, 0x6c, 0x3f, 0xdc, 0x05, 0xd5, 0x91, 0x8f, 0x82, 0xd0, 0x09, 0x44, 0x4f, 0x35, 0x53, 0x9d,
  404. 0x5f, 0xb7, 0x2a, 0x7d, 0x56, 0xb3, 0x06, 0x76, 0x85, 0x83, 0x96, 0x0b, 0x9f, 0x02, 0xde, 0xab,
  405. 0x48, 0x51, 0x7a, 0x19, 0x3c, 0x4c, 0x65, 0xbb, 0xc1, 0x00, 0x1e, 0x10, 0x71, 0x13, 0xd0, 0x06,
  406. 0x75, 0x69, 0x6f, 0xe0, 0x6a, 0x2b, 0xb7, 0x4d, 0x89, 0x37, 0xe0, 0x2c, 0x6b, 0x60, 0x6e, 0x31,
  407. 0x53, 0xf3, 0xeb, 0x96, 0x7a, 0x98, 0x49, 0x59, 0x03, 0x5b, 0xcd, 0x75, 0x2d, 0x17, 0x1e, 0x82,
  408. 0x86, 0xa4, 0xc9, 0xe6, 0x50, 0x5b, 0xe5, 0xaa, 0x4d, 0x43, 0x0c, 0xa9, 0x91, 0x0d, 0xa9, 0x71,
  409. 0x9c, 0x0d, 0xa9, 0x59, 0x65, 0xb2, 0x17, 0xdf, 0x5b, 0x8a, 0x5d, 0xcf, 0xb5, 0x18, 0x0a, 0xdf,
  410. 0x80, 0x46, 0x88, 0xcf, 0xa8, 0x93, 0xa7, 0x90, 0x68, 0x6b, 0xf7, 0xca, 0xed, 0x06, 0xa3, 0x15,
  411. 0x23, 0x00, 0x5f, 0x02, 0x20, 0x69, 0x54, 0xee, 0xa5, 0x21, 0x31, 0x98, 0x11, 0xde, 0x96, 0x24,
  412. 0x52, 0xbd, 0x9f, 0x11, 0x46, 0x93, 0x8c, 0xf4, 0x81, 0x2e, 0xc7, 0xb4, 0xd0, 0xcb, 0x13, 0x5b,
  413. 0xe3, 0x8f, 0xb5, 0x53, 0x24, 0xb6, 0x60, 0xa7, 0xd9, 0xfd, 0xed, 0xfc, 0x80, 0xbf, 0x9c, 0x9f,
  414. 0x77, 0xe0, 0xd1, 0xc2, 0xfc, 0x2c, 0xe9, 0xe7, 0xf6, 0x54, 0x6e, 0xaf, 0x2d, 0x0d, 0xd4, 0xa2,
  415. 0x50, 0xe6, 0x31, 0x0b, 0x62, 0x82, 0xc9, 0x74, 0x4c, 0x89, 0xe3, 0x23, 0xe2, 0x6b, 0xeb, 0x6d,
  416. 0xa5, 0xbb, 0x2e, 0x82, 0x68, 0x8b, 0xfa, 0x01, 0x22, 0x3e, 0xdc, 0x06, 0x55, 0x14, 0xc7, 0x62,
  417. 0x4b, 0x9d, 0x6f, 0xa9, 0xa0, 0x38, 0x66, 0x90, 0xf9, 0xfa, 0x72, 0xae, 0x2b, 0x57, 0x73, 0x5d,
  418. 0xf9, 0x31, 0xd7, 0x95, 0x8b, 0x1b, 0xbd, 0x74, 0x75, 0xa3, 0x97, 0xbe, 0xdd, 0xe8, 0xa5, 0x0f,
  419. 0xcf, 0xbc, 0x80, 0xfa, 0xd3, 0xa1, 0x31, 0x8a, 0x26, 0xbd, 0xa2, 0x69, 0x79, 0x29, 0xfd, 0xdb,
  420. 0x0d, 0xd7, 0xf8, 0xc7, 0xf3, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5c, 0x85, 0xf0, 0x16, 0x03,
  421. 0x07, 0x00, 0x00,
  422. }
  423. func (m *ABCIResponses) Marshal() (dAtA []byte, err error) {
  424. size := m.Size()
  425. dAtA = make([]byte, size)
  426. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  427. if err != nil {
  428. return nil, err
  429. }
  430. return dAtA[:n], nil
  431. }
  432. func (m *ABCIResponses) MarshalTo(dAtA []byte) (int, error) {
  433. size := m.Size()
  434. return m.MarshalToSizedBuffer(dAtA[:size])
  435. }
  436. func (m *ABCIResponses) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  437. i := len(dAtA)
  438. _ = i
  439. var l int
  440. _ = l
  441. if m.BeginBlock != nil {
  442. {
  443. size, err := m.BeginBlock.MarshalToSizedBuffer(dAtA[:i])
  444. if err != nil {
  445. return 0, err
  446. }
  447. i -= size
  448. i = encodeVarintTypes(dAtA, i, uint64(size))
  449. }
  450. i--
  451. dAtA[i] = 0x1a
  452. }
  453. if m.EndBlock != nil {
  454. {
  455. size, err := m.EndBlock.MarshalToSizedBuffer(dAtA[:i])
  456. if err != nil {
  457. return 0, err
  458. }
  459. i -= size
  460. i = encodeVarintTypes(dAtA, i, uint64(size))
  461. }
  462. i--
  463. dAtA[i] = 0x12
  464. }
  465. if len(m.DeliverTxs) > 0 {
  466. for iNdEx := len(m.DeliverTxs) - 1; iNdEx >= 0; iNdEx-- {
  467. {
  468. size, err := m.DeliverTxs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  469. if err != nil {
  470. return 0, err
  471. }
  472. i -= size
  473. i = encodeVarintTypes(dAtA, i, uint64(size))
  474. }
  475. i--
  476. dAtA[i] = 0xa
  477. }
  478. }
  479. return len(dAtA) - i, nil
  480. }
  481. func (m *ValidatorsInfo) Marshal() (dAtA []byte, err error) {
  482. size := m.Size()
  483. dAtA = make([]byte, size)
  484. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  485. if err != nil {
  486. return nil, err
  487. }
  488. return dAtA[:n], nil
  489. }
  490. func (m *ValidatorsInfo) MarshalTo(dAtA []byte) (int, error) {
  491. size := m.Size()
  492. return m.MarshalToSizedBuffer(dAtA[:size])
  493. }
  494. func (m *ValidatorsInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  495. i := len(dAtA)
  496. _ = i
  497. var l int
  498. _ = l
  499. if m.LastHeightChanged != 0 {
  500. i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightChanged))
  501. i--
  502. dAtA[i] = 0x10
  503. }
  504. if m.ValidatorSet != nil {
  505. {
  506. size, err := m.ValidatorSet.MarshalToSizedBuffer(dAtA[:i])
  507. if err != nil {
  508. return 0, err
  509. }
  510. i -= size
  511. i = encodeVarintTypes(dAtA, i, uint64(size))
  512. }
  513. i--
  514. dAtA[i] = 0xa
  515. }
  516. return len(dAtA) - i, nil
  517. }
  518. func (m *ConsensusParamsInfo) Marshal() (dAtA []byte, err error) {
  519. size := m.Size()
  520. dAtA = make([]byte, size)
  521. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  522. if err != nil {
  523. return nil, err
  524. }
  525. return dAtA[:n], nil
  526. }
  527. func (m *ConsensusParamsInfo) MarshalTo(dAtA []byte) (int, error) {
  528. size := m.Size()
  529. return m.MarshalToSizedBuffer(dAtA[:size])
  530. }
  531. func (m *ConsensusParamsInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  532. i := len(dAtA)
  533. _ = i
  534. var l int
  535. _ = l
  536. if m.LastHeightChanged != 0 {
  537. i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightChanged))
  538. i--
  539. dAtA[i] = 0x10
  540. }
  541. {
  542. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  543. if err != nil {
  544. return 0, err
  545. }
  546. i -= size
  547. i = encodeVarintTypes(dAtA, i, uint64(size))
  548. }
  549. i--
  550. dAtA[i] = 0xa
  551. return len(dAtA) - i, nil
  552. }
  553. func (m *Version) Marshal() (dAtA []byte, err error) {
  554. size := m.Size()
  555. dAtA = make([]byte, size)
  556. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  557. if err != nil {
  558. return nil, err
  559. }
  560. return dAtA[:n], nil
  561. }
  562. func (m *Version) MarshalTo(dAtA []byte) (int, error) {
  563. size := m.Size()
  564. return m.MarshalToSizedBuffer(dAtA[:size])
  565. }
  566. func (m *Version) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  567. i := len(dAtA)
  568. _ = i
  569. var l int
  570. _ = l
  571. if len(m.Software) > 0 {
  572. i -= len(m.Software)
  573. copy(dAtA[i:], m.Software)
  574. i = encodeVarintTypes(dAtA, i, uint64(len(m.Software)))
  575. i--
  576. dAtA[i] = 0x12
  577. }
  578. {
  579. size, err := m.Consensus.MarshalToSizedBuffer(dAtA[:i])
  580. if err != nil {
  581. return 0, err
  582. }
  583. i -= size
  584. i = encodeVarintTypes(dAtA, i, uint64(size))
  585. }
  586. i--
  587. dAtA[i] = 0xa
  588. return len(dAtA) - i, nil
  589. }
  590. func (m *State) Marshal() (dAtA []byte, err error) {
  591. size := m.Size()
  592. dAtA = make([]byte, size)
  593. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  594. if err != nil {
  595. return nil, err
  596. }
  597. return dAtA[:n], nil
  598. }
  599. func (m *State) MarshalTo(dAtA []byte) (int, error) {
  600. size := m.Size()
  601. return m.MarshalToSizedBuffer(dAtA[:size])
  602. }
  603. func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  604. i := len(dAtA)
  605. _ = i
  606. var l int
  607. _ = l
  608. if len(m.AppHash) > 0 {
  609. i -= len(m.AppHash)
  610. copy(dAtA[i:], m.AppHash)
  611. i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
  612. i--
  613. dAtA[i] = 0x6a
  614. }
  615. if len(m.LastResultsHash) > 0 {
  616. i -= len(m.LastResultsHash)
  617. copy(dAtA[i:], m.LastResultsHash)
  618. i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash)))
  619. i--
  620. dAtA[i] = 0x62
  621. }
  622. if m.LastHeightConsensusParamsChanged != 0 {
  623. i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightConsensusParamsChanged))
  624. i--
  625. dAtA[i] = 0x58
  626. }
  627. {
  628. size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  629. if err != nil {
  630. return 0, err
  631. }
  632. i -= size
  633. i = encodeVarintTypes(dAtA, i, uint64(size))
  634. }
  635. i--
  636. dAtA[i] = 0x52
  637. if m.LastHeightValidatorsChanged != 0 {
  638. i = encodeVarintTypes(dAtA, i, uint64(m.LastHeightValidatorsChanged))
  639. i--
  640. dAtA[i] = 0x48
  641. }
  642. if m.LastValidators != nil {
  643. {
  644. size, err := m.LastValidators.MarshalToSizedBuffer(dAtA[:i])
  645. if err != nil {
  646. return 0, err
  647. }
  648. i -= size
  649. i = encodeVarintTypes(dAtA, i, uint64(size))
  650. }
  651. i--
  652. dAtA[i] = 0x42
  653. }
  654. if m.Validators != nil {
  655. {
  656. size, err := m.Validators.MarshalToSizedBuffer(dAtA[:i])
  657. if err != nil {
  658. return 0, err
  659. }
  660. i -= size
  661. i = encodeVarintTypes(dAtA, i, uint64(size))
  662. }
  663. i--
  664. dAtA[i] = 0x3a
  665. }
  666. if m.NextValidators != nil {
  667. {
  668. size, err := m.NextValidators.MarshalToSizedBuffer(dAtA[:i])
  669. if err != nil {
  670. return 0, err
  671. }
  672. i -= size
  673. i = encodeVarintTypes(dAtA, i, uint64(size))
  674. }
  675. i--
  676. dAtA[i] = 0x32
  677. }
  678. n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):])
  679. if err10 != nil {
  680. return 0, err10
  681. }
  682. i -= n10
  683. i = encodeVarintTypes(dAtA, i, uint64(n10))
  684. i--
  685. dAtA[i] = 0x2a
  686. {
  687. size, err := m.LastBlockID.MarshalToSizedBuffer(dAtA[:i])
  688. if err != nil {
  689. return 0, err
  690. }
  691. i -= size
  692. i = encodeVarintTypes(dAtA, i, uint64(size))
  693. }
  694. i--
  695. dAtA[i] = 0x22
  696. if m.LastBlockHeight != 0 {
  697. i = encodeVarintTypes(dAtA, i, uint64(m.LastBlockHeight))
  698. i--
  699. dAtA[i] = 0x18
  700. }
  701. if len(m.ChainID) > 0 {
  702. i -= len(m.ChainID)
  703. copy(dAtA[i:], m.ChainID)
  704. i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID)))
  705. i--
  706. dAtA[i] = 0x12
  707. }
  708. {
  709. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  710. if err != nil {
  711. return 0, err
  712. }
  713. i -= size
  714. i = encodeVarintTypes(dAtA, i, uint64(size))
  715. }
  716. i--
  717. dAtA[i] = 0xa
  718. return len(dAtA) - i, nil
  719. }
  720. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  721. offset -= sovTypes(v)
  722. base := offset
  723. for v >= 1<<7 {
  724. dAtA[offset] = uint8(v&0x7f | 0x80)
  725. v >>= 7
  726. offset++
  727. }
  728. dAtA[offset] = uint8(v)
  729. return base
  730. }
  731. func (m *ABCIResponses) Size() (n int) {
  732. if m == nil {
  733. return 0
  734. }
  735. var l int
  736. _ = l
  737. if len(m.DeliverTxs) > 0 {
  738. for _, e := range m.DeliverTxs {
  739. l = e.Size()
  740. n += 1 + l + sovTypes(uint64(l))
  741. }
  742. }
  743. if m.EndBlock != nil {
  744. l = m.EndBlock.Size()
  745. n += 1 + l + sovTypes(uint64(l))
  746. }
  747. if m.BeginBlock != nil {
  748. l = m.BeginBlock.Size()
  749. n += 1 + l + sovTypes(uint64(l))
  750. }
  751. return n
  752. }
  753. func (m *ValidatorsInfo) Size() (n int) {
  754. if m == nil {
  755. return 0
  756. }
  757. var l int
  758. _ = l
  759. if m.ValidatorSet != nil {
  760. l = m.ValidatorSet.Size()
  761. n += 1 + l + sovTypes(uint64(l))
  762. }
  763. if m.LastHeightChanged != 0 {
  764. n += 1 + sovTypes(uint64(m.LastHeightChanged))
  765. }
  766. return n
  767. }
  768. func (m *ConsensusParamsInfo) Size() (n int) {
  769. if m == nil {
  770. return 0
  771. }
  772. var l int
  773. _ = l
  774. l = m.ConsensusParams.Size()
  775. n += 1 + l + sovTypes(uint64(l))
  776. if m.LastHeightChanged != 0 {
  777. n += 1 + sovTypes(uint64(m.LastHeightChanged))
  778. }
  779. return n
  780. }
  781. func (m *Version) Size() (n int) {
  782. if m == nil {
  783. return 0
  784. }
  785. var l int
  786. _ = l
  787. l = m.Consensus.Size()
  788. n += 1 + l + sovTypes(uint64(l))
  789. l = len(m.Software)
  790. if l > 0 {
  791. n += 1 + l + sovTypes(uint64(l))
  792. }
  793. return n
  794. }
  795. func (m *State) Size() (n int) {
  796. if m == nil {
  797. return 0
  798. }
  799. var l int
  800. _ = l
  801. l = m.Version.Size()
  802. n += 1 + l + sovTypes(uint64(l))
  803. l = len(m.ChainID)
  804. if l > 0 {
  805. n += 1 + l + sovTypes(uint64(l))
  806. }
  807. if m.LastBlockHeight != 0 {
  808. n += 1 + sovTypes(uint64(m.LastBlockHeight))
  809. }
  810. l = m.LastBlockID.Size()
  811. n += 1 + l + sovTypes(uint64(l))
  812. l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime)
  813. n += 1 + l + sovTypes(uint64(l))
  814. if m.NextValidators != nil {
  815. l = m.NextValidators.Size()
  816. n += 1 + l + sovTypes(uint64(l))
  817. }
  818. if m.Validators != nil {
  819. l = m.Validators.Size()
  820. n += 1 + l + sovTypes(uint64(l))
  821. }
  822. if m.LastValidators != nil {
  823. l = m.LastValidators.Size()
  824. n += 1 + l + sovTypes(uint64(l))
  825. }
  826. if m.LastHeightValidatorsChanged != 0 {
  827. n += 1 + sovTypes(uint64(m.LastHeightValidatorsChanged))
  828. }
  829. l = m.ConsensusParams.Size()
  830. n += 1 + l + sovTypes(uint64(l))
  831. if m.LastHeightConsensusParamsChanged != 0 {
  832. n += 1 + sovTypes(uint64(m.LastHeightConsensusParamsChanged))
  833. }
  834. l = len(m.LastResultsHash)
  835. if l > 0 {
  836. n += 1 + l + sovTypes(uint64(l))
  837. }
  838. l = len(m.AppHash)
  839. if l > 0 {
  840. n += 1 + l + sovTypes(uint64(l))
  841. }
  842. return n
  843. }
  844. func sovTypes(x uint64) (n int) {
  845. return (math_bits.Len64(x|1) + 6) / 7
  846. }
  847. func sozTypes(x uint64) (n int) {
  848. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  849. }
  850. func (m *ABCIResponses) Unmarshal(dAtA []byte) error {
  851. l := len(dAtA)
  852. iNdEx := 0
  853. for iNdEx < l {
  854. preIndex := iNdEx
  855. var wire uint64
  856. for shift := uint(0); ; shift += 7 {
  857. if shift >= 64 {
  858. return ErrIntOverflowTypes
  859. }
  860. if iNdEx >= l {
  861. return io.ErrUnexpectedEOF
  862. }
  863. b := dAtA[iNdEx]
  864. iNdEx++
  865. wire |= uint64(b&0x7F) << shift
  866. if b < 0x80 {
  867. break
  868. }
  869. }
  870. fieldNum := int32(wire >> 3)
  871. wireType := int(wire & 0x7)
  872. if wireType == 4 {
  873. return fmt.Errorf("proto: ABCIResponses: wiretype end group for non-group")
  874. }
  875. if fieldNum <= 0 {
  876. return fmt.Errorf("proto: ABCIResponses: illegal tag %d (wire type %d)", fieldNum, wire)
  877. }
  878. switch fieldNum {
  879. case 1:
  880. if wireType != 2 {
  881. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTxs", wireType)
  882. }
  883. var msglen int
  884. for shift := uint(0); ; shift += 7 {
  885. if shift >= 64 {
  886. return ErrIntOverflowTypes
  887. }
  888. if iNdEx >= l {
  889. return io.ErrUnexpectedEOF
  890. }
  891. b := dAtA[iNdEx]
  892. iNdEx++
  893. msglen |= int(b&0x7F) << shift
  894. if b < 0x80 {
  895. break
  896. }
  897. }
  898. if msglen < 0 {
  899. return ErrInvalidLengthTypes
  900. }
  901. postIndex := iNdEx + msglen
  902. if postIndex < 0 {
  903. return ErrInvalidLengthTypes
  904. }
  905. if postIndex > l {
  906. return io.ErrUnexpectedEOF
  907. }
  908. m.DeliverTxs = append(m.DeliverTxs, &types.ResponseDeliverTx{})
  909. if err := m.DeliverTxs[len(m.DeliverTxs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  910. return err
  911. }
  912. iNdEx = postIndex
  913. case 2:
  914. if wireType != 2 {
  915. return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType)
  916. }
  917. var msglen int
  918. for shift := uint(0); ; shift += 7 {
  919. if shift >= 64 {
  920. return ErrIntOverflowTypes
  921. }
  922. if iNdEx >= l {
  923. return io.ErrUnexpectedEOF
  924. }
  925. b := dAtA[iNdEx]
  926. iNdEx++
  927. msglen |= int(b&0x7F) << shift
  928. if b < 0x80 {
  929. break
  930. }
  931. }
  932. if msglen < 0 {
  933. return ErrInvalidLengthTypes
  934. }
  935. postIndex := iNdEx + msglen
  936. if postIndex < 0 {
  937. return ErrInvalidLengthTypes
  938. }
  939. if postIndex > l {
  940. return io.ErrUnexpectedEOF
  941. }
  942. if m.EndBlock == nil {
  943. m.EndBlock = &types.ResponseEndBlock{}
  944. }
  945. if err := m.EndBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  946. return err
  947. }
  948. iNdEx = postIndex
  949. case 3:
  950. if wireType != 2 {
  951. return fmt.Errorf("proto: wrong wireType = %d for field BeginBlock", wireType)
  952. }
  953. var msglen int
  954. for shift := uint(0); ; shift += 7 {
  955. if shift >= 64 {
  956. return ErrIntOverflowTypes
  957. }
  958. if iNdEx >= l {
  959. return io.ErrUnexpectedEOF
  960. }
  961. b := dAtA[iNdEx]
  962. iNdEx++
  963. msglen |= int(b&0x7F) << shift
  964. if b < 0x80 {
  965. break
  966. }
  967. }
  968. if msglen < 0 {
  969. return ErrInvalidLengthTypes
  970. }
  971. postIndex := iNdEx + msglen
  972. if postIndex < 0 {
  973. return ErrInvalidLengthTypes
  974. }
  975. if postIndex > l {
  976. return io.ErrUnexpectedEOF
  977. }
  978. if m.BeginBlock == nil {
  979. m.BeginBlock = &types.ResponseBeginBlock{}
  980. }
  981. if err := m.BeginBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  982. return err
  983. }
  984. iNdEx = postIndex
  985. default:
  986. iNdEx = preIndex
  987. skippy, err := skipTypes(dAtA[iNdEx:])
  988. if err != nil {
  989. return err
  990. }
  991. if skippy < 0 {
  992. return ErrInvalidLengthTypes
  993. }
  994. if (iNdEx + skippy) < 0 {
  995. return ErrInvalidLengthTypes
  996. }
  997. if (iNdEx + skippy) > l {
  998. return io.ErrUnexpectedEOF
  999. }
  1000. iNdEx += skippy
  1001. }
  1002. }
  1003. if iNdEx > l {
  1004. return io.ErrUnexpectedEOF
  1005. }
  1006. return nil
  1007. }
  1008. func (m *ValidatorsInfo) Unmarshal(dAtA []byte) error {
  1009. l := len(dAtA)
  1010. iNdEx := 0
  1011. for iNdEx < l {
  1012. preIndex := iNdEx
  1013. var wire uint64
  1014. for shift := uint(0); ; shift += 7 {
  1015. if shift >= 64 {
  1016. return ErrIntOverflowTypes
  1017. }
  1018. if iNdEx >= l {
  1019. return io.ErrUnexpectedEOF
  1020. }
  1021. b := dAtA[iNdEx]
  1022. iNdEx++
  1023. wire |= uint64(b&0x7F) << shift
  1024. if b < 0x80 {
  1025. break
  1026. }
  1027. }
  1028. fieldNum := int32(wire >> 3)
  1029. wireType := int(wire & 0x7)
  1030. if wireType == 4 {
  1031. return fmt.Errorf("proto: ValidatorsInfo: wiretype end group for non-group")
  1032. }
  1033. if fieldNum <= 0 {
  1034. return fmt.Errorf("proto: ValidatorsInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  1035. }
  1036. switch fieldNum {
  1037. case 1:
  1038. if wireType != 2 {
  1039. return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSet", wireType)
  1040. }
  1041. var msglen int
  1042. for shift := uint(0); ; shift += 7 {
  1043. if shift >= 64 {
  1044. return ErrIntOverflowTypes
  1045. }
  1046. if iNdEx >= l {
  1047. return io.ErrUnexpectedEOF
  1048. }
  1049. b := dAtA[iNdEx]
  1050. iNdEx++
  1051. msglen |= int(b&0x7F) << shift
  1052. if b < 0x80 {
  1053. break
  1054. }
  1055. }
  1056. if msglen < 0 {
  1057. return ErrInvalidLengthTypes
  1058. }
  1059. postIndex := iNdEx + msglen
  1060. if postIndex < 0 {
  1061. return ErrInvalidLengthTypes
  1062. }
  1063. if postIndex > l {
  1064. return io.ErrUnexpectedEOF
  1065. }
  1066. if m.ValidatorSet == nil {
  1067. m.ValidatorSet = &types1.ValidatorSet{}
  1068. }
  1069. if err := m.ValidatorSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1070. return err
  1071. }
  1072. iNdEx = postIndex
  1073. case 2:
  1074. if wireType != 0 {
  1075. return fmt.Errorf("proto: wrong wireType = %d for field LastHeightChanged", wireType)
  1076. }
  1077. m.LastHeightChanged = 0
  1078. for shift := uint(0); ; shift += 7 {
  1079. if shift >= 64 {
  1080. return ErrIntOverflowTypes
  1081. }
  1082. if iNdEx >= l {
  1083. return io.ErrUnexpectedEOF
  1084. }
  1085. b := dAtA[iNdEx]
  1086. iNdEx++
  1087. m.LastHeightChanged |= int64(b&0x7F) << shift
  1088. if b < 0x80 {
  1089. break
  1090. }
  1091. }
  1092. default:
  1093. iNdEx = preIndex
  1094. skippy, err := skipTypes(dAtA[iNdEx:])
  1095. if err != nil {
  1096. return err
  1097. }
  1098. if skippy < 0 {
  1099. return ErrInvalidLengthTypes
  1100. }
  1101. if (iNdEx + skippy) < 0 {
  1102. return ErrInvalidLengthTypes
  1103. }
  1104. if (iNdEx + skippy) > l {
  1105. return io.ErrUnexpectedEOF
  1106. }
  1107. iNdEx += skippy
  1108. }
  1109. }
  1110. if iNdEx > l {
  1111. return io.ErrUnexpectedEOF
  1112. }
  1113. return nil
  1114. }
  1115. func (m *ConsensusParamsInfo) Unmarshal(dAtA []byte) error {
  1116. l := len(dAtA)
  1117. iNdEx := 0
  1118. for iNdEx < l {
  1119. preIndex := iNdEx
  1120. var wire uint64
  1121. for shift := uint(0); ; shift += 7 {
  1122. if shift >= 64 {
  1123. return ErrIntOverflowTypes
  1124. }
  1125. if iNdEx >= l {
  1126. return io.ErrUnexpectedEOF
  1127. }
  1128. b := dAtA[iNdEx]
  1129. iNdEx++
  1130. wire |= uint64(b&0x7F) << shift
  1131. if b < 0x80 {
  1132. break
  1133. }
  1134. }
  1135. fieldNum := int32(wire >> 3)
  1136. wireType := int(wire & 0x7)
  1137. if wireType == 4 {
  1138. return fmt.Errorf("proto: ConsensusParamsInfo: wiretype end group for non-group")
  1139. }
  1140. if fieldNum <= 0 {
  1141. return fmt.Errorf("proto: ConsensusParamsInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  1142. }
  1143. switch fieldNum {
  1144. case 1:
  1145. if wireType != 2 {
  1146. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  1147. }
  1148. var msglen int
  1149. for shift := uint(0); ; shift += 7 {
  1150. if shift >= 64 {
  1151. return ErrIntOverflowTypes
  1152. }
  1153. if iNdEx >= l {
  1154. return io.ErrUnexpectedEOF
  1155. }
  1156. b := dAtA[iNdEx]
  1157. iNdEx++
  1158. msglen |= int(b&0x7F) << shift
  1159. if b < 0x80 {
  1160. break
  1161. }
  1162. }
  1163. if msglen < 0 {
  1164. return ErrInvalidLengthTypes
  1165. }
  1166. postIndex := iNdEx + msglen
  1167. if postIndex < 0 {
  1168. return ErrInvalidLengthTypes
  1169. }
  1170. if postIndex > l {
  1171. return io.ErrUnexpectedEOF
  1172. }
  1173. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1174. return err
  1175. }
  1176. iNdEx = postIndex
  1177. case 2:
  1178. if wireType != 0 {
  1179. return fmt.Errorf("proto: wrong wireType = %d for field LastHeightChanged", wireType)
  1180. }
  1181. m.LastHeightChanged = 0
  1182. for shift := uint(0); ; shift += 7 {
  1183. if shift >= 64 {
  1184. return ErrIntOverflowTypes
  1185. }
  1186. if iNdEx >= l {
  1187. return io.ErrUnexpectedEOF
  1188. }
  1189. b := dAtA[iNdEx]
  1190. iNdEx++
  1191. m.LastHeightChanged |= int64(b&0x7F) << shift
  1192. if b < 0x80 {
  1193. break
  1194. }
  1195. }
  1196. default:
  1197. iNdEx = preIndex
  1198. skippy, err := skipTypes(dAtA[iNdEx:])
  1199. if err != nil {
  1200. return err
  1201. }
  1202. if skippy < 0 {
  1203. return ErrInvalidLengthTypes
  1204. }
  1205. if (iNdEx + skippy) < 0 {
  1206. return ErrInvalidLengthTypes
  1207. }
  1208. if (iNdEx + skippy) > l {
  1209. return io.ErrUnexpectedEOF
  1210. }
  1211. iNdEx += skippy
  1212. }
  1213. }
  1214. if iNdEx > l {
  1215. return io.ErrUnexpectedEOF
  1216. }
  1217. return nil
  1218. }
  1219. func (m *Version) Unmarshal(dAtA []byte) error {
  1220. l := len(dAtA)
  1221. iNdEx := 0
  1222. for iNdEx < l {
  1223. preIndex := iNdEx
  1224. var wire uint64
  1225. for shift := uint(0); ; shift += 7 {
  1226. if shift >= 64 {
  1227. return ErrIntOverflowTypes
  1228. }
  1229. if iNdEx >= l {
  1230. return io.ErrUnexpectedEOF
  1231. }
  1232. b := dAtA[iNdEx]
  1233. iNdEx++
  1234. wire |= uint64(b&0x7F) << shift
  1235. if b < 0x80 {
  1236. break
  1237. }
  1238. }
  1239. fieldNum := int32(wire >> 3)
  1240. wireType := int(wire & 0x7)
  1241. if wireType == 4 {
  1242. return fmt.Errorf("proto: Version: wiretype end group for non-group")
  1243. }
  1244. if fieldNum <= 0 {
  1245. return fmt.Errorf("proto: Version: illegal tag %d (wire type %d)", fieldNum, wire)
  1246. }
  1247. switch fieldNum {
  1248. case 1:
  1249. if wireType != 2 {
  1250. return fmt.Errorf("proto: wrong wireType = %d for field Consensus", wireType)
  1251. }
  1252. var msglen int
  1253. for shift := uint(0); ; shift += 7 {
  1254. if shift >= 64 {
  1255. return ErrIntOverflowTypes
  1256. }
  1257. if iNdEx >= l {
  1258. return io.ErrUnexpectedEOF
  1259. }
  1260. b := dAtA[iNdEx]
  1261. iNdEx++
  1262. msglen |= int(b&0x7F) << shift
  1263. if b < 0x80 {
  1264. break
  1265. }
  1266. }
  1267. if msglen < 0 {
  1268. return ErrInvalidLengthTypes
  1269. }
  1270. postIndex := iNdEx + msglen
  1271. if postIndex < 0 {
  1272. return ErrInvalidLengthTypes
  1273. }
  1274. if postIndex > l {
  1275. return io.ErrUnexpectedEOF
  1276. }
  1277. if err := m.Consensus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1278. return err
  1279. }
  1280. iNdEx = postIndex
  1281. case 2:
  1282. if wireType != 2 {
  1283. return fmt.Errorf("proto: wrong wireType = %d for field Software", wireType)
  1284. }
  1285. var stringLen uint64
  1286. for shift := uint(0); ; shift += 7 {
  1287. if shift >= 64 {
  1288. return ErrIntOverflowTypes
  1289. }
  1290. if iNdEx >= l {
  1291. return io.ErrUnexpectedEOF
  1292. }
  1293. b := dAtA[iNdEx]
  1294. iNdEx++
  1295. stringLen |= uint64(b&0x7F) << shift
  1296. if b < 0x80 {
  1297. break
  1298. }
  1299. }
  1300. intStringLen := int(stringLen)
  1301. if intStringLen < 0 {
  1302. return ErrInvalidLengthTypes
  1303. }
  1304. postIndex := iNdEx + intStringLen
  1305. if postIndex < 0 {
  1306. return ErrInvalidLengthTypes
  1307. }
  1308. if postIndex > l {
  1309. return io.ErrUnexpectedEOF
  1310. }
  1311. m.Software = string(dAtA[iNdEx:postIndex])
  1312. iNdEx = postIndex
  1313. default:
  1314. iNdEx = preIndex
  1315. skippy, err := skipTypes(dAtA[iNdEx:])
  1316. if err != nil {
  1317. return err
  1318. }
  1319. if skippy < 0 {
  1320. return ErrInvalidLengthTypes
  1321. }
  1322. if (iNdEx + skippy) < 0 {
  1323. return ErrInvalidLengthTypes
  1324. }
  1325. if (iNdEx + skippy) > l {
  1326. return io.ErrUnexpectedEOF
  1327. }
  1328. iNdEx += skippy
  1329. }
  1330. }
  1331. if iNdEx > l {
  1332. return io.ErrUnexpectedEOF
  1333. }
  1334. return nil
  1335. }
  1336. func (m *State) Unmarshal(dAtA []byte) error {
  1337. l := len(dAtA)
  1338. iNdEx := 0
  1339. for iNdEx < l {
  1340. preIndex := iNdEx
  1341. var wire uint64
  1342. for shift := uint(0); ; shift += 7 {
  1343. if shift >= 64 {
  1344. return ErrIntOverflowTypes
  1345. }
  1346. if iNdEx >= l {
  1347. return io.ErrUnexpectedEOF
  1348. }
  1349. b := dAtA[iNdEx]
  1350. iNdEx++
  1351. wire |= uint64(b&0x7F) << shift
  1352. if b < 0x80 {
  1353. break
  1354. }
  1355. }
  1356. fieldNum := int32(wire >> 3)
  1357. wireType := int(wire & 0x7)
  1358. if wireType == 4 {
  1359. return fmt.Errorf("proto: State: wiretype end group for non-group")
  1360. }
  1361. if fieldNum <= 0 {
  1362. return fmt.Errorf("proto: State: illegal tag %d (wire type %d)", fieldNum, wire)
  1363. }
  1364. switch fieldNum {
  1365. case 1:
  1366. if wireType != 2 {
  1367. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1368. }
  1369. var msglen int
  1370. for shift := uint(0); ; shift += 7 {
  1371. if shift >= 64 {
  1372. return ErrIntOverflowTypes
  1373. }
  1374. if iNdEx >= l {
  1375. return io.ErrUnexpectedEOF
  1376. }
  1377. b := dAtA[iNdEx]
  1378. iNdEx++
  1379. msglen |= int(b&0x7F) << shift
  1380. if b < 0x80 {
  1381. break
  1382. }
  1383. }
  1384. if msglen < 0 {
  1385. return ErrInvalidLengthTypes
  1386. }
  1387. postIndex := iNdEx + msglen
  1388. if postIndex < 0 {
  1389. return ErrInvalidLengthTypes
  1390. }
  1391. if postIndex > l {
  1392. return io.ErrUnexpectedEOF
  1393. }
  1394. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1395. return err
  1396. }
  1397. iNdEx = postIndex
  1398. case 2:
  1399. if wireType != 2 {
  1400. return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType)
  1401. }
  1402. var stringLen uint64
  1403. for shift := uint(0); ; shift += 7 {
  1404. if shift >= 64 {
  1405. return ErrIntOverflowTypes
  1406. }
  1407. if iNdEx >= l {
  1408. return io.ErrUnexpectedEOF
  1409. }
  1410. b := dAtA[iNdEx]
  1411. iNdEx++
  1412. stringLen |= uint64(b&0x7F) << shift
  1413. if b < 0x80 {
  1414. break
  1415. }
  1416. }
  1417. intStringLen := int(stringLen)
  1418. if intStringLen < 0 {
  1419. return ErrInvalidLengthTypes
  1420. }
  1421. postIndex := iNdEx + intStringLen
  1422. if postIndex < 0 {
  1423. return ErrInvalidLengthTypes
  1424. }
  1425. if postIndex > l {
  1426. return io.ErrUnexpectedEOF
  1427. }
  1428. m.ChainID = string(dAtA[iNdEx:postIndex])
  1429. iNdEx = postIndex
  1430. case 3:
  1431. if wireType != 0 {
  1432. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType)
  1433. }
  1434. m.LastBlockHeight = 0
  1435. for shift := uint(0); ; shift += 7 {
  1436. if shift >= 64 {
  1437. return ErrIntOverflowTypes
  1438. }
  1439. if iNdEx >= l {
  1440. return io.ErrUnexpectedEOF
  1441. }
  1442. b := dAtA[iNdEx]
  1443. iNdEx++
  1444. m.LastBlockHeight |= int64(b&0x7F) << shift
  1445. if b < 0x80 {
  1446. break
  1447. }
  1448. }
  1449. case 4:
  1450. if wireType != 2 {
  1451. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockID", wireType)
  1452. }
  1453. var msglen int
  1454. for shift := uint(0); ; shift += 7 {
  1455. if shift >= 64 {
  1456. return ErrIntOverflowTypes
  1457. }
  1458. if iNdEx >= l {
  1459. return io.ErrUnexpectedEOF
  1460. }
  1461. b := dAtA[iNdEx]
  1462. iNdEx++
  1463. msglen |= int(b&0x7F) << shift
  1464. if b < 0x80 {
  1465. break
  1466. }
  1467. }
  1468. if msglen < 0 {
  1469. return ErrInvalidLengthTypes
  1470. }
  1471. postIndex := iNdEx + msglen
  1472. if postIndex < 0 {
  1473. return ErrInvalidLengthTypes
  1474. }
  1475. if postIndex > l {
  1476. return io.ErrUnexpectedEOF
  1477. }
  1478. if err := m.LastBlockID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1479. return err
  1480. }
  1481. iNdEx = postIndex
  1482. case 5:
  1483. if wireType != 2 {
  1484. return fmt.Errorf("proto: wrong wireType = %d for field LastBlockTime", wireType)
  1485. }
  1486. var msglen int
  1487. for shift := uint(0); ; shift += 7 {
  1488. if shift >= 64 {
  1489. return ErrIntOverflowTypes
  1490. }
  1491. if iNdEx >= l {
  1492. return io.ErrUnexpectedEOF
  1493. }
  1494. b := dAtA[iNdEx]
  1495. iNdEx++
  1496. msglen |= int(b&0x7F) << shift
  1497. if b < 0x80 {
  1498. break
  1499. }
  1500. }
  1501. if msglen < 0 {
  1502. return ErrInvalidLengthTypes
  1503. }
  1504. postIndex := iNdEx + msglen
  1505. if postIndex < 0 {
  1506. return ErrInvalidLengthTypes
  1507. }
  1508. if postIndex > l {
  1509. return io.ErrUnexpectedEOF
  1510. }
  1511. if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastBlockTime, dAtA[iNdEx:postIndex]); err != nil {
  1512. return err
  1513. }
  1514. iNdEx = postIndex
  1515. case 6:
  1516. if wireType != 2 {
  1517. return fmt.Errorf("proto: wrong wireType = %d for field NextValidators", wireType)
  1518. }
  1519. var msglen int
  1520. for shift := uint(0); ; shift += 7 {
  1521. if shift >= 64 {
  1522. return ErrIntOverflowTypes
  1523. }
  1524. if iNdEx >= l {
  1525. return io.ErrUnexpectedEOF
  1526. }
  1527. b := dAtA[iNdEx]
  1528. iNdEx++
  1529. msglen |= int(b&0x7F) << shift
  1530. if b < 0x80 {
  1531. break
  1532. }
  1533. }
  1534. if msglen < 0 {
  1535. return ErrInvalidLengthTypes
  1536. }
  1537. postIndex := iNdEx + msglen
  1538. if postIndex < 0 {
  1539. return ErrInvalidLengthTypes
  1540. }
  1541. if postIndex > l {
  1542. return io.ErrUnexpectedEOF
  1543. }
  1544. if m.NextValidators == nil {
  1545. m.NextValidators = &types1.ValidatorSet{}
  1546. }
  1547. if err := m.NextValidators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1548. return err
  1549. }
  1550. iNdEx = postIndex
  1551. case 7:
  1552. if wireType != 2 {
  1553. return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType)
  1554. }
  1555. var msglen int
  1556. for shift := uint(0); ; shift += 7 {
  1557. if shift >= 64 {
  1558. return ErrIntOverflowTypes
  1559. }
  1560. if iNdEx >= l {
  1561. return io.ErrUnexpectedEOF
  1562. }
  1563. b := dAtA[iNdEx]
  1564. iNdEx++
  1565. msglen |= int(b&0x7F) << shift
  1566. if b < 0x80 {
  1567. break
  1568. }
  1569. }
  1570. if msglen < 0 {
  1571. return ErrInvalidLengthTypes
  1572. }
  1573. postIndex := iNdEx + msglen
  1574. if postIndex < 0 {
  1575. return ErrInvalidLengthTypes
  1576. }
  1577. if postIndex > l {
  1578. return io.ErrUnexpectedEOF
  1579. }
  1580. if m.Validators == nil {
  1581. m.Validators = &types1.ValidatorSet{}
  1582. }
  1583. if err := m.Validators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1584. return err
  1585. }
  1586. iNdEx = postIndex
  1587. case 8:
  1588. if wireType != 2 {
  1589. return fmt.Errorf("proto: wrong wireType = %d for field LastValidators", wireType)
  1590. }
  1591. var msglen int
  1592. for shift := uint(0); ; shift += 7 {
  1593. if shift >= 64 {
  1594. return ErrIntOverflowTypes
  1595. }
  1596. if iNdEx >= l {
  1597. return io.ErrUnexpectedEOF
  1598. }
  1599. b := dAtA[iNdEx]
  1600. iNdEx++
  1601. msglen |= int(b&0x7F) << shift
  1602. if b < 0x80 {
  1603. break
  1604. }
  1605. }
  1606. if msglen < 0 {
  1607. return ErrInvalidLengthTypes
  1608. }
  1609. postIndex := iNdEx + msglen
  1610. if postIndex < 0 {
  1611. return ErrInvalidLengthTypes
  1612. }
  1613. if postIndex > l {
  1614. return io.ErrUnexpectedEOF
  1615. }
  1616. if m.LastValidators == nil {
  1617. m.LastValidators = &types1.ValidatorSet{}
  1618. }
  1619. if err := m.LastValidators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1620. return err
  1621. }
  1622. iNdEx = postIndex
  1623. case 9:
  1624. if wireType != 0 {
  1625. return fmt.Errorf("proto: wrong wireType = %d for field LastHeightValidatorsChanged", wireType)
  1626. }
  1627. m.LastHeightValidatorsChanged = 0
  1628. for shift := uint(0); ; shift += 7 {
  1629. if shift >= 64 {
  1630. return ErrIntOverflowTypes
  1631. }
  1632. if iNdEx >= l {
  1633. return io.ErrUnexpectedEOF
  1634. }
  1635. b := dAtA[iNdEx]
  1636. iNdEx++
  1637. m.LastHeightValidatorsChanged |= int64(b&0x7F) << shift
  1638. if b < 0x80 {
  1639. break
  1640. }
  1641. }
  1642. case 10:
  1643. if wireType != 2 {
  1644. return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  1645. }
  1646. var msglen int
  1647. for shift := uint(0); ; shift += 7 {
  1648. if shift >= 64 {
  1649. return ErrIntOverflowTypes
  1650. }
  1651. if iNdEx >= l {
  1652. return io.ErrUnexpectedEOF
  1653. }
  1654. b := dAtA[iNdEx]
  1655. iNdEx++
  1656. msglen |= int(b&0x7F) << shift
  1657. if b < 0x80 {
  1658. break
  1659. }
  1660. }
  1661. if msglen < 0 {
  1662. return ErrInvalidLengthTypes
  1663. }
  1664. postIndex := iNdEx + msglen
  1665. if postIndex < 0 {
  1666. return ErrInvalidLengthTypes
  1667. }
  1668. if postIndex > l {
  1669. return io.ErrUnexpectedEOF
  1670. }
  1671. if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1672. return err
  1673. }
  1674. iNdEx = postIndex
  1675. case 11:
  1676. if wireType != 0 {
  1677. return fmt.Errorf("proto: wrong wireType = %d for field LastHeightConsensusParamsChanged", wireType)
  1678. }
  1679. m.LastHeightConsensusParamsChanged = 0
  1680. for shift := uint(0); ; shift += 7 {
  1681. if shift >= 64 {
  1682. return ErrIntOverflowTypes
  1683. }
  1684. if iNdEx >= l {
  1685. return io.ErrUnexpectedEOF
  1686. }
  1687. b := dAtA[iNdEx]
  1688. iNdEx++
  1689. m.LastHeightConsensusParamsChanged |= int64(b&0x7F) << shift
  1690. if b < 0x80 {
  1691. break
  1692. }
  1693. }
  1694. case 12:
  1695. if wireType != 2 {
  1696. return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType)
  1697. }
  1698. var byteLen int
  1699. for shift := uint(0); ; shift += 7 {
  1700. if shift >= 64 {
  1701. return ErrIntOverflowTypes
  1702. }
  1703. if iNdEx >= l {
  1704. return io.ErrUnexpectedEOF
  1705. }
  1706. b := dAtA[iNdEx]
  1707. iNdEx++
  1708. byteLen |= int(b&0x7F) << shift
  1709. if b < 0x80 {
  1710. break
  1711. }
  1712. }
  1713. if byteLen < 0 {
  1714. return ErrInvalidLengthTypes
  1715. }
  1716. postIndex := iNdEx + byteLen
  1717. if postIndex < 0 {
  1718. return ErrInvalidLengthTypes
  1719. }
  1720. if postIndex > l {
  1721. return io.ErrUnexpectedEOF
  1722. }
  1723. m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...)
  1724. if m.LastResultsHash == nil {
  1725. m.LastResultsHash = []byte{}
  1726. }
  1727. iNdEx = postIndex
  1728. case 13:
  1729. if wireType != 2 {
  1730. return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
  1731. }
  1732. var byteLen int
  1733. for shift := uint(0); ; shift += 7 {
  1734. if shift >= 64 {
  1735. return ErrIntOverflowTypes
  1736. }
  1737. if iNdEx >= l {
  1738. return io.ErrUnexpectedEOF
  1739. }
  1740. b := dAtA[iNdEx]
  1741. iNdEx++
  1742. byteLen |= int(b&0x7F) << shift
  1743. if b < 0x80 {
  1744. break
  1745. }
  1746. }
  1747. if byteLen < 0 {
  1748. return ErrInvalidLengthTypes
  1749. }
  1750. postIndex := iNdEx + byteLen
  1751. if postIndex < 0 {
  1752. return ErrInvalidLengthTypes
  1753. }
  1754. if postIndex > l {
  1755. return io.ErrUnexpectedEOF
  1756. }
  1757. m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...)
  1758. if m.AppHash == nil {
  1759. m.AppHash = []byte{}
  1760. }
  1761. iNdEx = postIndex
  1762. default:
  1763. iNdEx = preIndex
  1764. skippy, err := skipTypes(dAtA[iNdEx:])
  1765. if err != nil {
  1766. return err
  1767. }
  1768. if skippy < 0 {
  1769. return ErrInvalidLengthTypes
  1770. }
  1771. if (iNdEx + skippy) < 0 {
  1772. return ErrInvalidLengthTypes
  1773. }
  1774. if (iNdEx + skippy) > l {
  1775. return io.ErrUnexpectedEOF
  1776. }
  1777. iNdEx += skippy
  1778. }
  1779. }
  1780. if iNdEx > l {
  1781. return io.ErrUnexpectedEOF
  1782. }
  1783. return nil
  1784. }
  1785. func skipTypes(dAtA []byte) (n int, err error) {
  1786. l := len(dAtA)
  1787. iNdEx := 0
  1788. depth := 0
  1789. for iNdEx < l {
  1790. var wire uint64
  1791. for shift := uint(0); ; shift += 7 {
  1792. if shift >= 64 {
  1793. return 0, ErrIntOverflowTypes
  1794. }
  1795. if iNdEx >= l {
  1796. return 0, io.ErrUnexpectedEOF
  1797. }
  1798. b := dAtA[iNdEx]
  1799. iNdEx++
  1800. wire |= (uint64(b) & 0x7F) << shift
  1801. if b < 0x80 {
  1802. break
  1803. }
  1804. }
  1805. wireType := int(wire & 0x7)
  1806. switch wireType {
  1807. case 0:
  1808. for shift := uint(0); ; shift += 7 {
  1809. if shift >= 64 {
  1810. return 0, ErrIntOverflowTypes
  1811. }
  1812. if iNdEx >= l {
  1813. return 0, io.ErrUnexpectedEOF
  1814. }
  1815. iNdEx++
  1816. if dAtA[iNdEx-1] < 0x80 {
  1817. break
  1818. }
  1819. }
  1820. case 1:
  1821. iNdEx += 8
  1822. case 2:
  1823. var length int
  1824. for shift := uint(0); ; shift += 7 {
  1825. if shift >= 64 {
  1826. return 0, ErrIntOverflowTypes
  1827. }
  1828. if iNdEx >= l {
  1829. return 0, io.ErrUnexpectedEOF
  1830. }
  1831. b := dAtA[iNdEx]
  1832. iNdEx++
  1833. length |= (int(b) & 0x7F) << shift
  1834. if b < 0x80 {
  1835. break
  1836. }
  1837. }
  1838. if length < 0 {
  1839. return 0, ErrInvalidLengthTypes
  1840. }
  1841. iNdEx += length
  1842. case 3:
  1843. depth++
  1844. case 4:
  1845. if depth == 0 {
  1846. return 0, ErrUnexpectedEndOfGroupTypes
  1847. }
  1848. depth--
  1849. case 5:
  1850. iNdEx += 4
  1851. default:
  1852. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1853. }
  1854. if iNdEx < 0 {
  1855. return 0, ErrInvalidLengthTypes
  1856. }
  1857. if depth == 0 {
  1858. return iNdEx, nil
  1859. }
  1860. }
  1861. return 0, io.ErrUnexpectedEOF
  1862. }
  1863. var (
  1864. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  1865. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  1866. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  1867. )