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.

923 lines
23 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: proto/privval/types.proto
  3. package privval
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. keys "github.com/tendermint/tendermint/proto/crypto/keys"
  9. io "io"
  10. math "math"
  11. math_bits "math/bits"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  22. type Errors int32
  23. const (
  24. Errors_ERRORS_UNKNOWN Errors = 0
  25. Errors_ERRORS_UNEXPECTED_RESPONSE Errors = 1
  26. Errors_ERRORS_NO_CONNECTION Errors = 2
  27. Errors_ERRORS_CONNECTION_TIMEOUT Errors = 3
  28. Errors_ERRORS_READ_TIMEOUT Errors = 4
  29. Errors_ERRORS_WRITE_TIMEOUT Errors = 5
  30. )
  31. var Errors_name = map[int32]string{
  32. 0: "ERRORS_UNKNOWN",
  33. 1: "ERRORS_UNEXPECTED_RESPONSE",
  34. 2: "ERRORS_NO_CONNECTION",
  35. 3: "ERRORS_CONNECTION_TIMEOUT",
  36. 4: "ERRORS_READ_TIMEOUT",
  37. 5: "ERRORS_WRITE_TIMEOUT",
  38. }
  39. var Errors_value = map[string]int32{
  40. "ERRORS_UNKNOWN": 0,
  41. "ERRORS_UNEXPECTED_RESPONSE": 1,
  42. "ERRORS_NO_CONNECTION": 2,
  43. "ERRORS_CONNECTION_TIMEOUT": 3,
  44. "ERRORS_READ_TIMEOUT": 4,
  45. "ERRORS_WRITE_TIMEOUT": 5,
  46. }
  47. func (x Errors) String() string {
  48. return proto.EnumName(Errors_name, int32(x))
  49. }
  50. func (Errors) EnumDescriptor() ([]byte, []int) {
  51. return fileDescriptor_a9d74c406df3ad93, []int{0}
  52. }
  53. // FilePVKey stores the immutable part of PrivValidator.
  54. type FilePVKey struct {
  55. Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  56. PubKey keys.PublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
  57. PrivKey keys.PrivateKey `protobuf:"bytes,3,opt,name=priv_key,json=privKey,proto3" json:"priv_key"`
  58. FilePath string `protobuf:"bytes,4,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
  59. }
  60. func (m *FilePVKey) Reset() { *m = FilePVKey{} }
  61. func (m *FilePVKey) String() string { return proto.CompactTextString(m) }
  62. func (*FilePVKey) ProtoMessage() {}
  63. func (*FilePVKey) Descriptor() ([]byte, []int) {
  64. return fileDescriptor_a9d74c406df3ad93, []int{0}
  65. }
  66. func (m *FilePVKey) XXX_Unmarshal(b []byte) error {
  67. return m.Unmarshal(b)
  68. }
  69. func (m *FilePVKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  70. if deterministic {
  71. return xxx_messageInfo_FilePVKey.Marshal(b, m, deterministic)
  72. } else {
  73. b = b[:cap(b)]
  74. n, err := m.MarshalToSizedBuffer(b)
  75. if err != nil {
  76. return nil, err
  77. }
  78. return b[:n], nil
  79. }
  80. }
  81. func (m *FilePVKey) XXX_Merge(src proto.Message) {
  82. xxx_messageInfo_FilePVKey.Merge(m, src)
  83. }
  84. func (m *FilePVKey) XXX_Size() int {
  85. return m.Size()
  86. }
  87. func (m *FilePVKey) XXX_DiscardUnknown() {
  88. xxx_messageInfo_FilePVKey.DiscardUnknown(m)
  89. }
  90. var xxx_messageInfo_FilePVKey proto.InternalMessageInfo
  91. func (m *FilePVKey) GetAddress() []byte {
  92. if m != nil {
  93. return m.Address
  94. }
  95. return nil
  96. }
  97. func (m *FilePVKey) GetPubKey() keys.PublicKey {
  98. if m != nil {
  99. return m.PubKey
  100. }
  101. return keys.PublicKey{}
  102. }
  103. func (m *FilePVKey) GetPrivKey() keys.PrivateKey {
  104. if m != nil {
  105. return m.PrivKey
  106. }
  107. return keys.PrivateKey{}
  108. }
  109. func (m *FilePVKey) GetFilePath() string {
  110. if m != nil {
  111. return m.FilePath
  112. }
  113. return ""
  114. }
  115. // FilePVLastSignState stores the mutable part of PrivValidator.
  116. type FilePVLastSignState struct {
  117. Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
  118. Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
  119. Step int32 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"`
  120. Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
  121. SignBytes []byte `protobuf:"bytes,5,opt,name=sign_bytes,json=signBytes,proto3" json:"sign_bytes,omitempty"`
  122. FilePath string `protobuf:"bytes,6,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
  123. }
  124. func (m *FilePVLastSignState) Reset() { *m = FilePVLastSignState{} }
  125. func (m *FilePVLastSignState) String() string { return proto.CompactTextString(m) }
  126. func (*FilePVLastSignState) ProtoMessage() {}
  127. func (*FilePVLastSignState) Descriptor() ([]byte, []int) {
  128. return fileDescriptor_a9d74c406df3ad93, []int{1}
  129. }
  130. func (m *FilePVLastSignState) XXX_Unmarshal(b []byte) error {
  131. return m.Unmarshal(b)
  132. }
  133. func (m *FilePVLastSignState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  134. if deterministic {
  135. return xxx_messageInfo_FilePVLastSignState.Marshal(b, m, deterministic)
  136. } else {
  137. b = b[:cap(b)]
  138. n, err := m.MarshalToSizedBuffer(b)
  139. if err != nil {
  140. return nil, err
  141. }
  142. return b[:n], nil
  143. }
  144. }
  145. func (m *FilePVLastSignState) XXX_Merge(src proto.Message) {
  146. xxx_messageInfo_FilePVLastSignState.Merge(m, src)
  147. }
  148. func (m *FilePVLastSignState) XXX_Size() int {
  149. return m.Size()
  150. }
  151. func (m *FilePVLastSignState) XXX_DiscardUnknown() {
  152. xxx_messageInfo_FilePVLastSignState.DiscardUnknown(m)
  153. }
  154. var xxx_messageInfo_FilePVLastSignState proto.InternalMessageInfo
  155. func (m *FilePVLastSignState) GetHeight() int64 {
  156. if m != nil {
  157. return m.Height
  158. }
  159. return 0
  160. }
  161. func (m *FilePVLastSignState) GetRound() int32 {
  162. if m != nil {
  163. return m.Round
  164. }
  165. return 0
  166. }
  167. func (m *FilePVLastSignState) GetStep() int32 {
  168. if m != nil {
  169. return m.Step
  170. }
  171. return 0
  172. }
  173. func (m *FilePVLastSignState) GetSignature() []byte {
  174. if m != nil {
  175. return m.Signature
  176. }
  177. return nil
  178. }
  179. func (m *FilePVLastSignState) GetSignBytes() []byte {
  180. if m != nil {
  181. return m.SignBytes
  182. }
  183. return nil
  184. }
  185. func (m *FilePVLastSignState) GetFilePath() string {
  186. if m != nil {
  187. return m.FilePath
  188. }
  189. return ""
  190. }
  191. func init() {
  192. proto.RegisterEnum("tendermint.proto.privval.Errors", Errors_name, Errors_value)
  193. proto.RegisterType((*FilePVKey)(nil), "tendermint.proto.privval.FilePVKey")
  194. proto.RegisterType((*FilePVLastSignState)(nil), "tendermint.proto.privval.FilePVLastSignState")
  195. }
  196. func init() { proto.RegisterFile("proto/privval/types.proto", fileDescriptor_a9d74c406df3ad93) }
  197. var fileDescriptor_a9d74c406df3ad93 = []byte{
  198. // 493 bytes of a gzipped FileDescriptorProto
  199. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xcf, 0x6e, 0xd3, 0x4e,
  200. 0x18, 0xcc, 0x36, 0x89, 0xd3, 0xec, 0xaf, 0xfa, 0x29, 0xda, 0x56, 0xe0, 0x06, 0x62, 0xa2, 0x1e,
  201. 0x20, 0xe2, 0x60, 0x4b, 0xf0, 0x04, 0x24, 0xdd, 0x8a, 0x28, 0x60, 0x5b, 0x6b, 0x97, 0x22, 0x2e,
  202. 0x96, 0x1d, 0x2f, 0xf6, 0xaa, 0xa9, 0x6d, 0xad, 0xd7, 0x91, 0xfc, 0x16, 0x3c, 0x06, 0x57, 0xde,
  203. 0xa2, 0xc7, 0x5e, 0x90, 0x38, 0x21, 0x94, 0xbc, 0x08, 0xf2, 0x1f, 0xe2, 0x44, 0x1c, 0xb8, 0x7d,
  204. 0x33, 0xf3, 0x79, 0xe6, 0x1b, 0x79, 0xe1, 0x79, 0xc2, 0x63, 0x11, 0x6b, 0x09, 0x67, 0xeb, 0xb5,
  205. 0xbb, 0xd2, 0x44, 0x9e, 0xd0, 0x54, 0x2d, 0x39, 0x24, 0x0b, 0x1a, 0xf9, 0x94, 0xdf, 0xb1, 0x48,
  206. 0x54, 0x8c, 0x5a, 0x6f, 0x0d, 0x9f, 0x8b, 0x90, 0x71, 0xdf, 0x49, 0x5c, 0x2e, 0x72, 0xad, 0x32,
  207. 0x08, 0xe2, 0x20, 0x6e, 0xa6, 0x6a, 0x7f, 0x38, 0xaa, 0x98, 0x25, 0xcf, 0x13, 0x11, 0x6b, 0xb7,
  208. 0x34, 0x4f, 0xf7, 0x03, 0x2e, 0xbe, 0x03, 0xd8, 0xbf, 0x62, 0x2b, 0x6a, 0x7e, 0x58, 0xd0, 0x1c,
  209. 0xc9, 0xb0, 0xe7, 0xfa, 0x3e, 0xa7, 0x69, 0x2a, 0x83, 0x31, 0x98, 0x9c, 0x90, 0x3f, 0x10, 0x5d,
  210. 0xc1, 0x5e, 0x92, 0x79, 0xce, 0x2d, 0xcd, 0xe5, 0xa3, 0x31, 0x98, 0xfc, 0xf7, 0xea, 0x85, 0xfa,
  211. 0xd7, 0x69, 0x55, 0x86, 0x5a, 0x64, 0xa8, 0x66, 0xe6, 0xad, 0xd8, 0x72, 0x41, 0xf3, 0x69, 0xe7,
  212. 0xfe, 0xe7, 0xb3, 0x16, 0x91, 0x92, 0xcc, 0x2b, 0x12, 0xe6, 0xf0, 0xb8, 0x68, 0x50, 0x1a, 0xb5,
  213. 0x4b, 0xa3, 0xc9, 0x3f, 0x8c, 0x38, 0x5b, 0xbb, 0x82, 0x36, 0x4e, 0xbd, 0xe2, 0xfb, 0xc2, 0xea,
  214. 0x09, 0xec, 0x7f, 0x66, 0x2b, 0xea, 0x24, 0xae, 0x08, 0xe5, 0xce, 0x18, 0x4c, 0xfa, 0xe4, 0xb8,
  215. 0x20, 0x4c, 0x57, 0x84, 0x17, 0xdf, 0x00, 0x3c, 0xad, 0x7a, 0xbd, 0x73, 0x53, 0x61, 0xb1, 0x20,
  216. 0xb2, 0x84, 0x2b, 0x28, 0x7a, 0x04, 0xa5, 0x90, 0xb2, 0x20, 0x14, 0x65, 0xc1, 0x36, 0xa9, 0x11,
  217. 0x3a, 0x83, 0x5d, 0x1e, 0x67, 0x91, 0x5f, 0xb6, 0xeb, 0x92, 0x0a, 0x20, 0x04, 0x3b, 0xa9, 0xa0,
  218. 0x49, 0x79, 0x69, 0x97, 0x94, 0x33, 0x7a, 0x0a, 0xfb, 0x29, 0x0b, 0x22, 0x57, 0x64, 0x9c, 0x96,
  219. 0xb1, 0x27, 0xa4, 0x21, 0xd0, 0x08, 0xc2, 0x02, 0x38, 0x5e, 0x2e, 0x68, 0x2a, 0x77, 0x1b, 0x79,
  220. 0x5a, 0x10, 0x87, 0x37, 0x4b, 0x87, 0x37, 0xbf, 0xfc, 0x0a, 0xa0, 0x84, 0x39, 0x8f, 0x79, 0x8a,
  221. 0x10, 0xfc, 0x1f, 0x13, 0x62, 0x10, 0xcb, 0xb9, 0xd6, 0x17, 0xba, 0x71, 0xa3, 0x0f, 0x5a, 0x48,
  222. 0x81, 0xc3, 0x1d, 0x87, 0x3f, 0x9a, 0x78, 0x66, 0xe3, 0x4b, 0x87, 0x60, 0xcb, 0x34, 0x74, 0x0b,
  223. 0x0f, 0x00, 0x92, 0xe1, 0x59, 0xad, 0xeb, 0x86, 0x33, 0x33, 0x74, 0x1d, 0xcf, 0xec, 0xb9, 0xa1,
  224. 0x0f, 0x8e, 0xd0, 0x08, 0x9e, 0xd7, 0x4a, 0x43, 0x3b, 0xf6, 0xfc, 0x3d, 0x36, 0xae, 0xed, 0x41,
  225. 0x1b, 0x3d, 0x86, 0xa7, 0xb5, 0x4c, 0xf0, 0x9b, 0xcb, 0x9d, 0xd0, 0xd9, 0x73, 0xbc, 0x21, 0x73,
  226. 0x1b, 0xef, 0x94, 0xee, 0xf4, 0xed, 0xfd, 0x46, 0x01, 0x0f, 0x1b, 0x05, 0xfc, 0xda, 0x28, 0xe0,
  227. 0xcb, 0x56, 0x69, 0x3d, 0x6c, 0x95, 0xd6, 0x8f, 0xad, 0xd2, 0xfa, 0xa4, 0x06, 0x4c, 0x84, 0x99,
  228. 0xa7, 0x2e, 0xe3, 0x3b, 0xad, 0xf9, 0xb1, 0xfb, 0xe3, 0xc1, 0x6b, 0xf7, 0xa4, 0x12, 0xbe, 0xfe,
  229. 0x1d, 0x00, 0x00, 0xff, 0xff, 0x60, 0xba, 0xbc, 0x27, 0x05, 0x03, 0x00, 0x00,
  230. }
  231. func (m *FilePVKey) Marshal() (dAtA []byte, err error) {
  232. size := m.Size()
  233. dAtA = make([]byte, size)
  234. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  235. if err != nil {
  236. return nil, err
  237. }
  238. return dAtA[:n], nil
  239. }
  240. func (m *FilePVKey) MarshalTo(dAtA []byte) (int, error) {
  241. size := m.Size()
  242. return m.MarshalToSizedBuffer(dAtA[:size])
  243. }
  244. func (m *FilePVKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  245. i := len(dAtA)
  246. _ = i
  247. var l int
  248. _ = l
  249. if len(m.FilePath) > 0 {
  250. i -= len(m.FilePath)
  251. copy(dAtA[i:], m.FilePath)
  252. i = encodeVarintTypes(dAtA, i, uint64(len(m.FilePath)))
  253. i--
  254. dAtA[i] = 0x22
  255. }
  256. {
  257. size, err := m.PrivKey.MarshalToSizedBuffer(dAtA[:i])
  258. if err != nil {
  259. return 0, err
  260. }
  261. i -= size
  262. i = encodeVarintTypes(dAtA, i, uint64(size))
  263. }
  264. i--
  265. dAtA[i] = 0x1a
  266. {
  267. size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
  268. if err != nil {
  269. return 0, err
  270. }
  271. i -= size
  272. i = encodeVarintTypes(dAtA, i, uint64(size))
  273. }
  274. i--
  275. dAtA[i] = 0x12
  276. if len(m.Address) > 0 {
  277. i -= len(m.Address)
  278. copy(dAtA[i:], m.Address)
  279. i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  280. i--
  281. dAtA[i] = 0xa
  282. }
  283. return len(dAtA) - i, nil
  284. }
  285. func (m *FilePVLastSignState) Marshal() (dAtA []byte, err error) {
  286. size := m.Size()
  287. dAtA = make([]byte, size)
  288. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  289. if err != nil {
  290. return nil, err
  291. }
  292. return dAtA[:n], nil
  293. }
  294. func (m *FilePVLastSignState) MarshalTo(dAtA []byte) (int, error) {
  295. size := m.Size()
  296. return m.MarshalToSizedBuffer(dAtA[:size])
  297. }
  298. func (m *FilePVLastSignState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  299. i := len(dAtA)
  300. _ = i
  301. var l int
  302. _ = l
  303. if len(m.FilePath) > 0 {
  304. i -= len(m.FilePath)
  305. copy(dAtA[i:], m.FilePath)
  306. i = encodeVarintTypes(dAtA, i, uint64(len(m.FilePath)))
  307. i--
  308. dAtA[i] = 0x32
  309. }
  310. if len(m.SignBytes) > 0 {
  311. i -= len(m.SignBytes)
  312. copy(dAtA[i:], m.SignBytes)
  313. i = encodeVarintTypes(dAtA, i, uint64(len(m.SignBytes)))
  314. i--
  315. dAtA[i] = 0x2a
  316. }
  317. if len(m.Signature) > 0 {
  318. i -= len(m.Signature)
  319. copy(dAtA[i:], m.Signature)
  320. i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature)))
  321. i--
  322. dAtA[i] = 0x22
  323. }
  324. if m.Step != 0 {
  325. i = encodeVarintTypes(dAtA, i, uint64(m.Step))
  326. i--
  327. dAtA[i] = 0x18
  328. }
  329. if m.Round != 0 {
  330. i = encodeVarintTypes(dAtA, i, uint64(m.Round))
  331. i--
  332. dAtA[i] = 0x10
  333. }
  334. if m.Height != 0 {
  335. i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  336. i--
  337. dAtA[i] = 0x8
  338. }
  339. return len(dAtA) - i, nil
  340. }
  341. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  342. offset -= sovTypes(v)
  343. base := offset
  344. for v >= 1<<7 {
  345. dAtA[offset] = uint8(v&0x7f | 0x80)
  346. v >>= 7
  347. offset++
  348. }
  349. dAtA[offset] = uint8(v)
  350. return base
  351. }
  352. func (m *FilePVKey) Size() (n int) {
  353. if m == nil {
  354. return 0
  355. }
  356. var l int
  357. _ = l
  358. l = len(m.Address)
  359. if l > 0 {
  360. n += 1 + l + sovTypes(uint64(l))
  361. }
  362. l = m.PubKey.Size()
  363. n += 1 + l + sovTypes(uint64(l))
  364. l = m.PrivKey.Size()
  365. n += 1 + l + sovTypes(uint64(l))
  366. l = len(m.FilePath)
  367. if l > 0 {
  368. n += 1 + l + sovTypes(uint64(l))
  369. }
  370. return n
  371. }
  372. func (m *FilePVLastSignState) Size() (n int) {
  373. if m == nil {
  374. return 0
  375. }
  376. var l int
  377. _ = l
  378. if m.Height != 0 {
  379. n += 1 + sovTypes(uint64(m.Height))
  380. }
  381. if m.Round != 0 {
  382. n += 1 + sovTypes(uint64(m.Round))
  383. }
  384. if m.Step != 0 {
  385. n += 1 + sovTypes(uint64(m.Step))
  386. }
  387. l = len(m.Signature)
  388. if l > 0 {
  389. n += 1 + l + sovTypes(uint64(l))
  390. }
  391. l = len(m.SignBytes)
  392. if l > 0 {
  393. n += 1 + l + sovTypes(uint64(l))
  394. }
  395. l = len(m.FilePath)
  396. if l > 0 {
  397. n += 1 + l + sovTypes(uint64(l))
  398. }
  399. return n
  400. }
  401. func sovTypes(x uint64) (n int) {
  402. return (math_bits.Len64(x|1) + 6) / 7
  403. }
  404. func sozTypes(x uint64) (n int) {
  405. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  406. }
  407. func (m *FilePVKey) Unmarshal(dAtA []byte) error {
  408. l := len(dAtA)
  409. iNdEx := 0
  410. for iNdEx < l {
  411. preIndex := iNdEx
  412. var wire uint64
  413. for shift := uint(0); ; shift += 7 {
  414. if shift >= 64 {
  415. return ErrIntOverflowTypes
  416. }
  417. if iNdEx >= l {
  418. return io.ErrUnexpectedEOF
  419. }
  420. b := dAtA[iNdEx]
  421. iNdEx++
  422. wire |= uint64(b&0x7F) << shift
  423. if b < 0x80 {
  424. break
  425. }
  426. }
  427. fieldNum := int32(wire >> 3)
  428. wireType := int(wire & 0x7)
  429. if wireType == 4 {
  430. return fmt.Errorf("proto: FilePVKey: wiretype end group for non-group")
  431. }
  432. if fieldNum <= 0 {
  433. return fmt.Errorf("proto: FilePVKey: illegal tag %d (wire type %d)", fieldNum, wire)
  434. }
  435. switch fieldNum {
  436. case 1:
  437. if wireType != 2 {
  438. return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  439. }
  440. var byteLen int
  441. for shift := uint(0); ; shift += 7 {
  442. if shift >= 64 {
  443. return ErrIntOverflowTypes
  444. }
  445. if iNdEx >= l {
  446. return io.ErrUnexpectedEOF
  447. }
  448. b := dAtA[iNdEx]
  449. iNdEx++
  450. byteLen |= int(b&0x7F) << shift
  451. if b < 0x80 {
  452. break
  453. }
  454. }
  455. if byteLen < 0 {
  456. return ErrInvalidLengthTypes
  457. }
  458. postIndex := iNdEx + byteLen
  459. if postIndex < 0 {
  460. return ErrInvalidLengthTypes
  461. }
  462. if postIndex > l {
  463. return io.ErrUnexpectedEOF
  464. }
  465. m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
  466. if m.Address == nil {
  467. m.Address = []byte{}
  468. }
  469. iNdEx = postIndex
  470. case 2:
  471. if wireType != 2 {
  472. return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
  473. }
  474. var msglen int
  475. for shift := uint(0); ; shift += 7 {
  476. if shift >= 64 {
  477. return ErrIntOverflowTypes
  478. }
  479. if iNdEx >= l {
  480. return io.ErrUnexpectedEOF
  481. }
  482. b := dAtA[iNdEx]
  483. iNdEx++
  484. msglen |= int(b&0x7F) << shift
  485. if b < 0x80 {
  486. break
  487. }
  488. }
  489. if msglen < 0 {
  490. return ErrInvalidLengthTypes
  491. }
  492. postIndex := iNdEx + msglen
  493. if postIndex < 0 {
  494. return ErrInvalidLengthTypes
  495. }
  496. if postIndex > l {
  497. return io.ErrUnexpectedEOF
  498. }
  499. if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  500. return err
  501. }
  502. iNdEx = postIndex
  503. case 3:
  504. if wireType != 2 {
  505. return fmt.Errorf("proto: wrong wireType = %d for field PrivKey", wireType)
  506. }
  507. var msglen int
  508. for shift := uint(0); ; shift += 7 {
  509. if shift >= 64 {
  510. return ErrIntOverflowTypes
  511. }
  512. if iNdEx >= l {
  513. return io.ErrUnexpectedEOF
  514. }
  515. b := dAtA[iNdEx]
  516. iNdEx++
  517. msglen |= int(b&0x7F) << shift
  518. if b < 0x80 {
  519. break
  520. }
  521. }
  522. if msglen < 0 {
  523. return ErrInvalidLengthTypes
  524. }
  525. postIndex := iNdEx + msglen
  526. if postIndex < 0 {
  527. return ErrInvalidLengthTypes
  528. }
  529. if postIndex > l {
  530. return io.ErrUnexpectedEOF
  531. }
  532. if err := m.PrivKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  533. return err
  534. }
  535. iNdEx = postIndex
  536. case 4:
  537. if wireType != 2 {
  538. return fmt.Errorf("proto: wrong wireType = %d for field FilePath", wireType)
  539. }
  540. var stringLen uint64
  541. for shift := uint(0); ; shift += 7 {
  542. if shift >= 64 {
  543. return ErrIntOverflowTypes
  544. }
  545. if iNdEx >= l {
  546. return io.ErrUnexpectedEOF
  547. }
  548. b := dAtA[iNdEx]
  549. iNdEx++
  550. stringLen |= uint64(b&0x7F) << shift
  551. if b < 0x80 {
  552. break
  553. }
  554. }
  555. intStringLen := int(stringLen)
  556. if intStringLen < 0 {
  557. return ErrInvalidLengthTypes
  558. }
  559. postIndex := iNdEx + intStringLen
  560. if postIndex < 0 {
  561. return ErrInvalidLengthTypes
  562. }
  563. if postIndex > l {
  564. return io.ErrUnexpectedEOF
  565. }
  566. m.FilePath = string(dAtA[iNdEx:postIndex])
  567. iNdEx = postIndex
  568. default:
  569. iNdEx = preIndex
  570. skippy, err := skipTypes(dAtA[iNdEx:])
  571. if err != nil {
  572. return err
  573. }
  574. if skippy < 0 {
  575. return ErrInvalidLengthTypes
  576. }
  577. if (iNdEx + skippy) < 0 {
  578. return ErrInvalidLengthTypes
  579. }
  580. if (iNdEx + skippy) > l {
  581. return io.ErrUnexpectedEOF
  582. }
  583. iNdEx += skippy
  584. }
  585. }
  586. if iNdEx > l {
  587. return io.ErrUnexpectedEOF
  588. }
  589. return nil
  590. }
  591. func (m *FilePVLastSignState) Unmarshal(dAtA []byte) error {
  592. l := len(dAtA)
  593. iNdEx := 0
  594. for iNdEx < l {
  595. preIndex := iNdEx
  596. var wire uint64
  597. for shift := uint(0); ; shift += 7 {
  598. if shift >= 64 {
  599. return ErrIntOverflowTypes
  600. }
  601. if iNdEx >= l {
  602. return io.ErrUnexpectedEOF
  603. }
  604. b := dAtA[iNdEx]
  605. iNdEx++
  606. wire |= uint64(b&0x7F) << shift
  607. if b < 0x80 {
  608. break
  609. }
  610. }
  611. fieldNum := int32(wire >> 3)
  612. wireType := int(wire & 0x7)
  613. if wireType == 4 {
  614. return fmt.Errorf("proto: FilePVLastSignState: wiretype end group for non-group")
  615. }
  616. if fieldNum <= 0 {
  617. return fmt.Errorf("proto: FilePVLastSignState: illegal tag %d (wire type %d)", fieldNum, wire)
  618. }
  619. switch fieldNum {
  620. case 1:
  621. if wireType != 0 {
  622. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  623. }
  624. m.Height = 0
  625. for shift := uint(0); ; shift += 7 {
  626. if shift >= 64 {
  627. return ErrIntOverflowTypes
  628. }
  629. if iNdEx >= l {
  630. return io.ErrUnexpectedEOF
  631. }
  632. b := dAtA[iNdEx]
  633. iNdEx++
  634. m.Height |= int64(b&0x7F) << shift
  635. if b < 0x80 {
  636. break
  637. }
  638. }
  639. case 2:
  640. if wireType != 0 {
  641. return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  642. }
  643. m.Round = 0
  644. for shift := uint(0); ; shift += 7 {
  645. if shift >= 64 {
  646. return ErrIntOverflowTypes
  647. }
  648. if iNdEx >= l {
  649. return io.ErrUnexpectedEOF
  650. }
  651. b := dAtA[iNdEx]
  652. iNdEx++
  653. m.Round |= int32(b&0x7F) << shift
  654. if b < 0x80 {
  655. break
  656. }
  657. }
  658. case 3:
  659. if wireType != 0 {
  660. return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType)
  661. }
  662. m.Step = 0
  663. for shift := uint(0); ; shift += 7 {
  664. if shift >= 64 {
  665. return ErrIntOverflowTypes
  666. }
  667. if iNdEx >= l {
  668. return io.ErrUnexpectedEOF
  669. }
  670. b := dAtA[iNdEx]
  671. iNdEx++
  672. m.Step |= int32(b&0x7F) << shift
  673. if b < 0x80 {
  674. break
  675. }
  676. }
  677. case 4:
  678. if wireType != 2 {
  679. return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
  680. }
  681. var byteLen int
  682. for shift := uint(0); ; shift += 7 {
  683. if shift >= 64 {
  684. return ErrIntOverflowTypes
  685. }
  686. if iNdEx >= l {
  687. return io.ErrUnexpectedEOF
  688. }
  689. b := dAtA[iNdEx]
  690. iNdEx++
  691. byteLen |= int(b&0x7F) << shift
  692. if b < 0x80 {
  693. break
  694. }
  695. }
  696. if byteLen < 0 {
  697. return ErrInvalidLengthTypes
  698. }
  699. postIndex := iNdEx + byteLen
  700. if postIndex < 0 {
  701. return ErrInvalidLengthTypes
  702. }
  703. if postIndex > l {
  704. return io.ErrUnexpectedEOF
  705. }
  706. m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...)
  707. if m.Signature == nil {
  708. m.Signature = []byte{}
  709. }
  710. iNdEx = postIndex
  711. case 5:
  712. if wireType != 2 {
  713. return fmt.Errorf("proto: wrong wireType = %d for field SignBytes", wireType)
  714. }
  715. var byteLen int
  716. for shift := uint(0); ; shift += 7 {
  717. if shift >= 64 {
  718. return ErrIntOverflowTypes
  719. }
  720. if iNdEx >= l {
  721. return io.ErrUnexpectedEOF
  722. }
  723. b := dAtA[iNdEx]
  724. iNdEx++
  725. byteLen |= int(b&0x7F) << shift
  726. if b < 0x80 {
  727. break
  728. }
  729. }
  730. if byteLen < 0 {
  731. return ErrInvalidLengthTypes
  732. }
  733. postIndex := iNdEx + byteLen
  734. if postIndex < 0 {
  735. return ErrInvalidLengthTypes
  736. }
  737. if postIndex > l {
  738. return io.ErrUnexpectedEOF
  739. }
  740. m.SignBytes = append(m.SignBytes[:0], dAtA[iNdEx:postIndex]...)
  741. if m.SignBytes == nil {
  742. m.SignBytes = []byte{}
  743. }
  744. iNdEx = postIndex
  745. case 6:
  746. if wireType != 2 {
  747. return fmt.Errorf("proto: wrong wireType = %d for field FilePath", wireType)
  748. }
  749. var stringLen uint64
  750. for shift := uint(0); ; shift += 7 {
  751. if shift >= 64 {
  752. return ErrIntOverflowTypes
  753. }
  754. if iNdEx >= l {
  755. return io.ErrUnexpectedEOF
  756. }
  757. b := dAtA[iNdEx]
  758. iNdEx++
  759. stringLen |= uint64(b&0x7F) << shift
  760. if b < 0x80 {
  761. break
  762. }
  763. }
  764. intStringLen := int(stringLen)
  765. if intStringLen < 0 {
  766. return ErrInvalidLengthTypes
  767. }
  768. postIndex := iNdEx + intStringLen
  769. if postIndex < 0 {
  770. return ErrInvalidLengthTypes
  771. }
  772. if postIndex > l {
  773. return io.ErrUnexpectedEOF
  774. }
  775. m.FilePath = string(dAtA[iNdEx:postIndex])
  776. iNdEx = postIndex
  777. default:
  778. iNdEx = preIndex
  779. skippy, err := skipTypes(dAtA[iNdEx:])
  780. if err != nil {
  781. return err
  782. }
  783. if skippy < 0 {
  784. return ErrInvalidLengthTypes
  785. }
  786. if (iNdEx + skippy) < 0 {
  787. return ErrInvalidLengthTypes
  788. }
  789. if (iNdEx + skippy) > l {
  790. return io.ErrUnexpectedEOF
  791. }
  792. iNdEx += skippy
  793. }
  794. }
  795. if iNdEx > l {
  796. return io.ErrUnexpectedEOF
  797. }
  798. return nil
  799. }
  800. func skipTypes(dAtA []byte) (n int, err error) {
  801. l := len(dAtA)
  802. iNdEx := 0
  803. depth := 0
  804. for iNdEx < l {
  805. var wire uint64
  806. for shift := uint(0); ; shift += 7 {
  807. if shift >= 64 {
  808. return 0, ErrIntOverflowTypes
  809. }
  810. if iNdEx >= l {
  811. return 0, io.ErrUnexpectedEOF
  812. }
  813. b := dAtA[iNdEx]
  814. iNdEx++
  815. wire |= (uint64(b) & 0x7F) << shift
  816. if b < 0x80 {
  817. break
  818. }
  819. }
  820. wireType := int(wire & 0x7)
  821. switch wireType {
  822. case 0:
  823. for shift := uint(0); ; shift += 7 {
  824. if shift >= 64 {
  825. return 0, ErrIntOverflowTypes
  826. }
  827. if iNdEx >= l {
  828. return 0, io.ErrUnexpectedEOF
  829. }
  830. iNdEx++
  831. if dAtA[iNdEx-1] < 0x80 {
  832. break
  833. }
  834. }
  835. case 1:
  836. iNdEx += 8
  837. case 2:
  838. var length int
  839. for shift := uint(0); ; shift += 7 {
  840. if shift >= 64 {
  841. return 0, ErrIntOverflowTypes
  842. }
  843. if iNdEx >= l {
  844. return 0, io.ErrUnexpectedEOF
  845. }
  846. b := dAtA[iNdEx]
  847. iNdEx++
  848. length |= (int(b) & 0x7F) << shift
  849. if b < 0x80 {
  850. break
  851. }
  852. }
  853. if length < 0 {
  854. return 0, ErrInvalidLengthTypes
  855. }
  856. iNdEx += length
  857. case 3:
  858. depth++
  859. case 4:
  860. if depth == 0 {
  861. return 0, ErrUnexpectedEndOfGroupTypes
  862. }
  863. depth--
  864. case 5:
  865. iNdEx += 4
  866. default:
  867. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  868. }
  869. if iNdEx < 0 {
  870. return 0, ErrInvalidLengthTypes
  871. }
  872. if depth == 0 {
  873. return iNdEx, nil
  874. }
  875. }
  876. return 0, io.ErrUnexpectedEOF
  877. }
  878. var (
  879. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  880. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  881. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  882. )