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.

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