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.

1005 lines
24 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: rpc/grpc/types.proto
  3. /*
  4. Package core_grpc is a generated protocol buffer package.
  5. It is generated from these files:
  6. rpc/grpc/types.proto
  7. It has these top-level messages:
  8. RequestPing
  9. RequestBroadcastTx
  10. ResponsePing
  11. ResponseBroadcastTx
  12. */
  13. //nolint
  14. package core_grpc
  15. import proto "github.com/gogo/protobuf/proto"
  16. import golang_proto "github.com/golang/protobuf/proto"
  17. import fmt "fmt"
  18. import math "math"
  19. import _ "github.com/gogo/protobuf/gogoproto"
  20. import types "github.com/tendermint/tendermint/abci/types"
  21. import bytes "bytes"
  22. import context "golang.org/x/net/context"
  23. import grpc "google.golang.org/grpc"
  24. import io "io"
  25. // Reference imports to suppress errors if they are not otherwise used.
  26. var _ = proto.Marshal
  27. var _ = golang_proto.Marshal
  28. var _ = fmt.Errorf
  29. var _ = math.Inf
  30. // This is a compile-time assertion to ensure that this generated file
  31. // is compatible with the proto package it is being compiled against.
  32. // A compilation error at this line likely means your copy of the
  33. // proto package needs to be updated.
  34. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  35. type RequestPing struct {
  36. }
  37. func (m *RequestPing) Reset() { *m = RequestPing{} }
  38. func (m *RequestPing) String() string { return proto.CompactTextString(m) }
  39. func (*RequestPing) ProtoMessage() {}
  40. func (*RequestPing) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} }
  41. type RequestBroadcastTx struct {
  42. Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
  43. }
  44. func (m *RequestBroadcastTx) Reset() { *m = RequestBroadcastTx{} }
  45. func (m *RequestBroadcastTx) String() string { return proto.CompactTextString(m) }
  46. func (*RequestBroadcastTx) ProtoMessage() {}
  47. func (*RequestBroadcastTx) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} }
  48. func (m *RequestBroadcastTx) GetTx() []byte {
  49. if m != nil {
  50. return m.Tx
  51. }
  52. return nil
  53. }
  54. type ResponsePing struct {
  55. }
  56. func (m *ResponsePing) Reset() { *m = ResponsePing{} }
  57. func (m *ResponsePing) String() string { return proto.CompactTextString(m) }
  58. func (*ResponsePing) ProtoMessage() {}
  59. func (*ResponsePing) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} }
  60. type ResponseBroadcastTx struct {
  61. CheckTx *types.ResponseCheckTx `protobuf:"bytes,1,opt,name=check_tx,json=checkTx" json:"check_tx,omitempty"`
  62. DeliverTx *types.ResponseDeliverTx `protobuf:"bytes,2,opt,name=deliver_tx,json=deliverTx" json:"deliver_tx,omitempty"`
  63. }
  64. func (m *ResponseBroadcastTx) Reset() { *m = ResponseBroadcastTx{} }
  65. func (m *ResponseBroadcastTx) String() string { return proto.CompactTextString(m) }
  66. func (*ResponseBroadcastTx) ProtoMessage() {}
  67. func (*ResponseBroadcastTx) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{3} }
  68. func (m *ResponseBroadcastTx) GetCheckTx() *types.ResponseCheckTx {
  69. if m != nil {
  70. return m.CheckTx
  71. }
  72. return nil
  73. }
  74. func (m *ResponseBroadcastTx) GetDeliverTx() *types.ResponseDeliverTx {
  75. if m != nil {
  76. return m.DeliverTx
  77. }
  78. return nil
  79. }
  80. func init() {
  81. proto.RegisterType((*RequestPing)(nil), "core_grpc.RequestPing")
  82. golang_proto.RegisterType((*RequestPing)(nil), "core_grpc.RequestPing")
  83. proto.RegisterType((*RequestBroadcastTx)(nil), "core_grpc.RequestBroadcastTx")
  84. golang_proto.RegisterType((*RequestBroadcastTx)(nil), "core_grpc.RequestBroadcastTx")
  85. proto.RegisterType((*ResponsePing)(nil), "core_grpc.ResponsePing")
  86. golang_proto.RegisterType((*ResponsePing)(nil), "core_grpc.ResponsePing")
  87. proto.RegisterType((*ResponseBroadcastTx)(nil), "core_grpc.ResponseBroadcastTx")
  88. golang_proto.RegisterType((*ResponseBroadcastTx)(nil), "core_grpc.ResponseBroadcastTx")
  89. }
  90. func (this *RequestPing) Equal(that interface{}) bool {
  91. if that == nil {
  92. return this == nil
  93. }
  94. that1, ok := that.(*RequestPing)
  95. if !ok {
  96. that2, ok := that.(RequestPing)
  97. if ok {
  98. that1 = &that2
  99. } else {
  100. return false
  101. }
  102. }
  103. if that1 == nil {
  104. return this == nil
  105. } else if this == nil {
  106. return false
  107. }
  108. return true
  109. }
  110. func (this *RequestBroadcastTx) Equal(that interface{}) bool {
  111. if that == nil {
  112. return this == nil
  113. }
  114. that1, ok := that.(*RequestBroadcastTx)
  115. if !ok {
  116. that2, ok := that.(RequestBroadcastTx)
  117. if ok {
  118. that1 = &that2
  119. } else {
  120. return false
  121. }
  122. }
  123. if that1 == nil {
  124. return this == nil
  125. } else if this == nil {
  126. return false
  127. }
  128. if !bytes.Equal(this.Tx, that1.Tx) {
  129. return false
  130. }
  131. return true
  132. }
  133. func (this *ResponsePing) Equal(that interface{}) bool {
  134. if that == nil {
  135. return this == nil
  136. }
  137. that1, ok := that.(*ResponsePing)
  138. if !ok {
  139. that2, ok := that.(ResponsePing)
  140. if ok {
  141. that1 = &that2
  142. } else {
  143. return false
  144. }
  145. }
  146. if that1 == nil {
  147. return this == nil
  148. } else if this == nil {
  149. return false
  150. }
  151. return true
  152. }
  153. func (this *ResponseBroadcastTx) Equal(that interface{}) bool {
  154. if that == nil {
  155. return this == nil
  156. }
  157. that1, ok := that.(*ResponseBroadcastTx)
  158. if !ok {
  159. that2, ok := that.(ResponseBroadcastTx)
  160. if ok {
  161. that1 = &that2
  162. } else {
  163. return false
  164. }
  165. }
  166. if that1 == nil {
  167. return this == nil
  168. } else if this == nil {
  169. return false
  170. }
  171. if !this.CheckTx.Equal(that1.CheckTx) {
  172. return false
  173. }
  174. if !this.DeliverTx.Equal(that1.DeliverTx) {
  175. return false
  176. }
  177. return true
  178. }
  179. // Reference imports to suppress errors if they are not otherwise used.
  180. var _ context.Context
  181. var _ grpc.ClientConn
  182. // This is a compile-time assertion to ensure that this generated file
  183. // is compatible with the grpc package it is being compiled against.
  184. const _ = grpc.SupportPackageIsVersion4
  185. // Client API for BroadcastAPI service
  186. type BroadcastAPIClient interface {
  187. Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error)
  188. BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error)
  189. }
  190. type broadcastAPIClient struct {
  191. cc *grpc.ClientConn
  192. }
  193. func NewBroadcastAPIClient(cc *grpc.ClientConn) BroadcastAPIClient {
  194. return &broadcastAPIClient{cc}
  195. }
  196. func (c *broadcastAPIClient) Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error) {
  197. out := new(ResponsePing)
  198. err := grpc.Invoke(ctx, "/core_grpc.BroadcastAPI/Ping", in, out, c.cc, opts...)
  199. if err != nil {
  200. return nil, err
  201. }
  202. return out, nil
  203. }
  204. func (c *broadcastAPIClient) BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error) {
  205. out := new(ResponseBroadcastTx)
  206. err := grpc.Invoke(ctx, "/core_grpc.BroadcastAPI/BroadcastTx", in, out, c.cc, opts...)
  207. if err != nil {
  208. return nil, err
  209. }
  210. return out, nil
  211. }
  212. // Server API for BroadcastAPI service
  213. type BroadcastAPIServer interface {
  214. Ping(context.Context, *RequestPing) (*ResponsePing, error)
  215. BroadcastTx(context.Context, *RequestBroadcastTx) (*ResponseBroadcastTx, error)
  216. }
  217. func RegisterBroadcastAPIServer(s *grpc.Server, srv BroadcastAPIServer) {
  218. s.RegisterService(&_BroadcastAPI_serviceDesc, srv)
  219. }
  220. func _BroadcastAPI_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  221. in := new(RequestPing)
  222. if err := dec(in); err != nil {
  223. return nil, err
  224. }
  225. if interceptor == nil {
  226. return srv.(BroadcastAPIServer).Ping(ctx, in)
  227. }
  228. info := &grpc.UnaryServerInfo{
  229. Server: srv,
  230. FullMethod: "/core_grpc.BroadcastAPI/Ping",
  231. }
  232. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  233. return srv.(BroadcastAPIServer).Ping(ctx, req.(*RequestPing))
  234. }
  235. return interceptor(ctx, in, info, handler)
  236. }
  237. func _BroadcastAPI_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  238. in := new(RequestBroadcastTx)
  239. if err := dec(in); err != nil {
  240. return nil, err
  241. }
  242. if interceptor == nil {
  243. return srv.(BroadcastAPIServer).BroadcastTx(ctx, in)
  244. }
  245. info := &grpc.UnaryServerInfo{
  246. Server: srv,
  247. FullMethod: "/core_grpc.BroadcastAPI/BroadcastTx",
  248. }
  249. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  250. return srv.(BroadcastAPIServer).BroadcastTx(ctx, req.(*RequestBroadcastTx))
  251. }
  252. return interceptor(ctx, in, info, handler)
  253. }
  254. var _BroadcastAPI_serviceDesc = grpc.ServiceDesc{
  255. ServiceName: "core_grpc.BroadcastAPI",
  256. HandlerType: (*BroadcastAPIServer)(nil),
  257. Methods: []grpc.MethodDesc{
  258. {
  259. MethodName: "Ping",
  260. Handler: _BroadcastAPI_Ping_Handler,
  261. },
  262. {
  263. MethodName: "BroadcastTx",
  264. Handler: _BroadcastAPI_BroadcastTx_Handler,
  265. },
  266. },
  267. Streams: []grpc.StreamDesc{},
  268. Metadata: "rpc/grpc/types.proto",
  269. }
  270. func (m *RequestPing) Marshal() (dAtA []byte, err error) {
  271. size := m.Size()
  272. dAtA = make([]byte, size)
  273. n, err := m.MarshalTo(dAtA)
  274. if err != nil {
  275. return nil, err
  276. }
  277. return dAtA[:n], nil
  278. }
  279. func (m *RequestPing) MarshalTo(dAtA []byte) (int, error) {
  280. var i int
  281. _ = i
  282. var l int
  283. _ = l
  284. return i, nil
  285. }
  286. func (m *RequestBroadcastTx) Marshal() (dAtA []byte, err error) {
  287. size := m.Size()
  288. dAtA = make([]byte, size)
  289. n, err := m.MarshalTo(dAtA)
  290. if err != nil {
  291. return nil, err
  292. }
  293. return dAtA[:n], nil
  294. }
  295. func (m *RequestBroadcastTx) MarshalTo(dAtA []byte) (int, error) {
  296. var i int
  297. _ = i
  298. var l int
  299. _ = l
  300. if len(m.Tx) > 0 {
  301. dAtA[i] = 0xa
  302. i++
  303. i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx)))
  304. i += copy(dAtA[i:], m.Tx)
  305. }
  306. return i, nil
  307. }
  308. func (m *ResponsePing) Marshal() (dAtA []byte, err error) {
  309. size := m.Size()
  310. dAtA = make([]byte, size)
  311. n, err := m.MarshalTo(dAtA)
  312. if err != nil {
  313. return nil, err
  314. }
  315. return dAtA[:n], nil
  316. }
  317. func (m *ResponsePing) MarshalTo(dAtA []byte) (int, error) {
  318. var i int
  319. _ = i
  320. var l int
  321. _ = l
  322. return i, nil
  323. }
  324. func (m *ResponseBroadcastTx) Marshal() (dAtA []byte, err error) {
  325. size := m.Size()
  326. dAtA = make([]byte, size)
  327. n, err := m.MarshalTo(dAtA)
  328. if err != nil {
  329. return nil, err
  330. }
  331. return dAtA[:n], nil
  332. }
  333. func (m *ResponseBroadcastTx) MarshalTo(dAtA []byte) (int, error) {
  334. var i int
  335. _ = i
  336. var l int
  337. _ = l
  338. if m.CheckTx != nil {
  339. dAtA[i] = 0xa
  340. i++
  341. i = encodeVarintTypes(dAtA, i, uint64(m.CheckTx.Size()))
  342. n1, err := m.CheckTx.MarshalTo(dAtA[i:])
  343. if err != nil {
  344. return 0, err
  345. }
  346. i += n1
  347. }
  348. if m.DeliverTx != nil {
  349. dAtA[i] = 0x12
  350. i++
  351. i = encodeVarintTypes(dAtA, i, uint64(m.DeliverTx.Size()))
  352. n2, err := m.DeliverTx.MarshalTo(dAtA[i:])
  353. if err != nil {
  354. return 0, err
  355. }
  356. i += n2
  357. }
  358. return i, nil
  359. }
  360. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  361. for v >= 1<<7 {
  362. dAtA[offset] = uint8(v&0x7f | 0x80)
  363. v >>= 7
  364. offset++
  365. }
  366. dAtA[offset] = uint8(v)
  367. return offset + 1
  368. }
  369. func NewPopulatedRequestPing(r randyTypes, easy bool) *RequestPing {
  370. this := &RequestPing{}
  371. if !easy && r.Intn(10) != 0 {
  372. }
  373. return this
  374. }
  375. func NewPopulatedRequestBroadcastTx(r randyTypes, easy bool) *RequestBroadcastTx {
  376. this := &RequestBroadcastTx{}
  377. v1 := r.Intn(100)
  378. this.Tx = make([]byte, v1)
  379. for i := 0; i < v1; i++ {
  380. this.Tx[i] = byte(r.Intn(256))
  381. }
  382. if !easy && r.Intn(10) != 0 {
  383. }
  384. return this
  385. }
  386. func NewPopulatedResponsePing(r randyTypes, easy bool) *ResponsePing {
  387. this := &ResponsePing{}
  388. if !easy && r.Intn(10) != 0 {
  389. }
  390. return this
  391. }
  392. func NewPopulatedResponseBroadcastTx(r randyTypes, easy bool) *ResponseBroadcastTx {
  393. this := &ResponseBroadcastTx{}
  394. if r.Intn(10) != 0 {
  395. this.CheckTx = types.NewPopulatedResponseCheckTx(r, easy)
  396. }
  397. if r.Intn(10) != 0 {
  398. this.DeliverTx = types.NewPopulatedResponseDeliverTx(r, easy)
  399. }
  400. if !easy && r.Intn(10) != 0 {
  401. }
  402. return this
  403. }
  404. type randyTypes interface {
  405. Float32() float32
  406. Float64() float64
  407. Int63() int64
  408. Int31() int32
  409. Uint32() uint32
  410. Intn(n int) int
  411. }
  412. func randUTF8RuneTypes(r randyTypes) rune {
  413. ru := r.Intn(62)
  414. if ru < 10 {
  415. return rune(ru + 48)
  416. } else if ru < 36 {
  417. return rune(ru + 55)
  418. }
  419. return rune(ru + 61)
  420. }
  421. func randStringTypes(r randyTypes) string {
  422. v2 := r.Intn(100)
  423. tmps := make([]rune, v2)
  424. for i := 0; i < v2; i++ {
  425. tmps[i] = randUTF8RuneTypes(r)
  426. }
  427. return string(tmps)
  428. }
  429. func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) {
  430. l := r.Intn(5)
  431. for i := 0; i < l; i++ {
  432. wire := r.Intn(4)
  433. if wire == 3 {
  434. wire = 5
  435. }
  436. fieldNumber := maxFieldNumber + r.Intn(100)
  437. dAtA = randFieldTypes(dAtA, r, fieldNumber, wire)
  438. }
  439. return dAtA
  440. }
  441. func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte {
  442. key := uint32(fieldNumber)<<3 | uint32(wire)
  443. switch wire {
  444. case 0:
  445. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  446. v3 := r.Int63()
  447. if r.Intn(2) == 0 {
  448. v3 *= -1
  449. }
  450. dAtA = encodeVarintPopulateTypes(dAtA, uint64(v3))
  451. case 1:
  452. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  453. dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
  454. case 2:
  455. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  456. ll := r.Intn(100)
  457. dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll))
  458. for j := 0; j < ll; j++ {
  459. dAtA = append(dAtA, byte(r.Intn(256)))
  460. }
  461. default:
  462. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  463. dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
  464. }
  465. return dAtA
  466. }
  467. func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte {
  468. for v >= 1<<7 {
  469. dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
  470. v >>= 7
  471. }
  472. dAtA = append(dAtA, uint8(v))
  473. return dAtA
  474. }
  475. func (m *RequestPing) Size() (n int) {
  476. var l int
  477. _ = l
  478. return n
  479. }
  480. func (m *RequestBroadcastTx) Size() (n int) {
  481. var l int
  482. _ = l
  483. l = len(m.Tx)
  484. if l > 0 {
  485. n += 1 + l + sovTypes(uint64(l))
  486. }
  487. return n
  488. }
  489. func (m *ResponsePing) Size() (n int) {
  490. var l int
  491. _ = l
  492. return n
  493. }
  494. func (m *ResponseBroadcastTx) Size() (n int) {
  495. var l int
  496. _ = l
  497. if m.CheckTx != nil {
  498. l = m.CheckTx.Size()
  499. n += 1 + l + sovTypes(uint64(l))
  500. }
  501. if m.DeliverTx != nil {
  502. l = m.DeliverTx.Size()
  503. n += 1 + l + sovTypes(uint64(l))
  504. }
  505. return n
  506. }
  507. func sovTypes(x uint64) (n int) {
  508. for {
  509. n++
  510. x >>= 7
  511. if x == 0 {
  512. break
  513. }
  514. }
  515. return n
  516. }
  517. func sozTypes(x uint64) (n int) {
  518. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  519. }
  520. func (m *RequestPing) Unmarshal(dAtA []byte) error {
  521. l := len(dAtA)
  522. iNdEx := 0
  523. for iNdEx < l {
  524. preIndex := iNdEx
  525. var wire uint64
  526. for shift := uint(0); ; shift += 7 {
  527. if shift >= 64 {
  528. return ErrIntOverflowTypes
  529. }
  530. if iNdEx >= l {
  531. return io.ErrUnexpectedEOF
  532. }
  533. b := dAtA[iNdEx]
  534. iNdEx++
  535. wire |= (uint64(b) & 0x7F) << shift
  536. if b < 0x80 {
  537. break
  538. }
  539. }
  540. fieldNum := int32(wire >> 3)
  541. wireType := int(wire & 0x7)
  542. if wireType == 4 {
  543. return fmt.Errorf("proto: RequestPing: wiretype end group for non-group")
  544. }
  545. if fieldNum <= 0 {
  546. return fmt.Errorf("proto: RequestPing: illegal tag %d (wire type %d)", fieldNum, wire)
  547. }
  548. switch fieldNum {
  549. default:
  550. iNdEx = preIndex
  551. skippy, err := skipTypes(dAtA[iNdEx:])
  552. if err != nil {
  553. return err
  554. }
  555. if skippy < 0 {
  556. return ErrInvalidLengthTypes
  557. }
  558. if (iNdEx + skippy) > l {
  559. return io.ErrUnexpectedEOF
  560. }
  561. iNdEx += skippy
  562. }
  563. }
  564. if iNdEx > l {
  565. return io.ErrUnexpectedEOF
  566. }
  567. return nil
  568. }
  569. func (m *RequestBroadcastTx) Unmarshal(dAtA []byte) error {
  570. l := len(dAtA)
  571. iNdEx := 0
  572. for iNdEx < l {
  573. preIndex := iNdEx
  574. var wire uint64
  575. for shift := uint(0); ; shift += 7 {
  576. if shift >= 64 {
  577. return ErrIntOverflowTypes
  578. }
  579. if iNdEx >= l {
  580. return io.ErrUnexpectedEOF
  581. }
  582. b := dAtA[iNdEx]
  583. iNdEx++
  584. wire |= (uint64(b) & 0x7F) << shift
  585. if b < 0x80 {
  586. break
  587. }
  588. }
  589. fieldNum := int32(wire >> 3)
  590. wireType := int(wire & 0x7)
  591. if wireType == 4 {
  592. return fmt.Errorf("proto: RequestBroadcastTx: wiretype end group for non-group")
  593. }
  594. if fieldNum <= 0 {
  595. return fmt.Errorf("proto: RequestBroadcastTx: illegal tag %d (wire type %d)", fieldNum, wire)
  596. }
  597. switch fieldNum {
  598. case 1:
  599. if wireType != 2 {
  600. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  601. }
  602. var byteLen int
  603. for shift := uint(0); ; shift += 7 {
  604. if shift >= 64 {
  605. return ErrIntOverflowTypes
  606. }
  607. if iNdEx >= l {
  608. return io.ErrUnexpectedEOF
  609. }
  610. b := dAtA[iNdEx]
  611. iNdEx++
  612. byteLen |= (int(b) & 0x7F) << shift
  613. if b < 0x80 {
  614. break
  615. }
  616. }
  617. if byteLen < 0 {
  618. return ErrInvalidLengthTypes
  619. }
  620. postIndex := iNdEx + byteLen
  621. if postIndex > l {
  622. return io.ErrUnexpectedEOF
  623. }
  624. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  625. if m.Tx == nil {
  626. m.Tx = []byte{}
  627. }
  628. iNdEx = postIndex
  629. default:
  630. iNdEx = preIndex
  631. skippy, err := skipTypes(dAtA[iNdEx:])
  632. if err != nil {
  633. return err
  634. }
  635. if skippy < 0 {
  636. return ErrInvalidLengthTypes
  637. }
  638. if (iNdEx + skippy) > l {
  639. return io.ErrUnexpectedEOF
  640. }
  641. iNdEx += skippy
  642. }
  643. }
  644. if iNdEx > l {
  645. return io.ErrUnexpectedEOF
  646. }
  647. return nil
  648. }
  649. func (m *ResponsePing) Unmarshal(dAtA []byte) error {
  650. l := len(dAtA)
  651. iNdEx := 0
  652. for iNdEx < l {
  653. preIndex := iNdEx
  654. var wire uint64
  655. for shift := uint(0); ; shift += 7 {
  656. if shift >= 64 {
  657. return ErrIntOverflowTypes
  658. }
  659. if iNdEx >= l {
  660. return io.ErrUnexpectedEOF
  661. }
  662. b := dAtA[iNdEx]
  663. iNdEx++
  664. wire |= (uint64(b) & 0x7F) << shift
  665. if b < 0x80 {
  666. break
  667. }
  668. }
  669. fieldNum := int32(wire >> 3)
  670. wireType := int(wire & 0x7)
  671. if wireType == 4 {
  672. return fmt.Errorf("proto: ResponsePing: wiretype end group for non-group")
  673. }
  674. if fieldNum <= 0 {
  675. return fmt.Errorf("proto: ResponsePing: illegal tag %d (wire type %d)", fieldNum, wire)
  676. }
  677. switch fieldNum {
  678. default:
  679. iNdEx = preIndex
  680. skippy, err := skipTypes(dAtA[iNdEx:])
  681. if err != nil {
  682. return err
  683. }
  684. if skippy < 0 {
  685. return ErrInvalidLengthTypes
  686. }
  687. if (iNdEx + skippy) > l {
  688. return io.ErrUnexpectedEOF
  689. }
  690. iNdEx += skippy
  691. }
  692. }
  693. if iNdEx > l {
  694. return io.ErrUnexpectedEOF
  695. }
  696. return nil
  697. }
  698. func (m *ResponseBroadcastTx) Unmarshal(dAtA []byte) error {
  699. l := len(dAtA)
  700. iNdEx := 0
  701. for iNdEx < l {
  702. preIndex := iNdEx
  703. var wire uint64
  704. for shift := uint(0); ; shift += 7 {
  705. if shift >= 64 {
  706. return ErrIntOverflowTypes
  707. }
  708. if iNdEx >= l {
  709. return io.ErrUnexpectedEOF
  710. }
  711. b := dAtA[iNdEx]
  712. iNdEx++
  713. wire |= (uint64(b) & 0x7F) << shift
  714. if b < 0x80 {
  715. break
  716. }
  717. }
  718. fieldNum := int32(wire >> 3)
  719. wireType := int(wire & 0x7)
  720. if wireType == 4 {
  721. return fmt.Errorf("proto: ResponseBroadcastTx: wiretype end group for non-group")
  722. }
  723. if fieldNum <= 0 {
  724. return fmt.Errorf("proto: ResponseBroadcastTx: illegal tag %d (wire type %d)", fieldNum, wire)
  725. }
  726. switch fieldNum {
  727. case 1:
  728. if wireType != 2 {
  729. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  730. }
  731. var msglen int
  732. for shift := uint(0); ; shift += 7 {
  733. if shift >= 64 {
  734. return ErrIntOverflowTypes
  735. }
  736. if iNdEx >= l {
  737. return io.ErrUnexpectedEOF
  738. }
  739. b := dAtA[iNdEx]
  740. iNdEx++
  741. msglen |= (int(b) & 0x7F) << shift
  742. if b < 0x80 {
  743. break
  744. }
  745. }
  746. if msglen < 0 {
  747. return ErrInvalidLengthTypes
  748. }
  749. postIndex := iNdEx + msglen
  750. if postIndex > l {
  751. return io.ErrUnexpectedEOF
  752. }
  753. if m.CheckTx == nil {
  754. m.CheckTx = &types.ResponseCheckTx{}
  755. }
  756. if err := m.CheckTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  757. return err
  758. }
  759. iNdEx = postIndex
  760. case 2:
  761. if wireType != 2 {
  762. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  763. }
  764. var msglen int
  765. for shift := uint(0); ; shift += 7 {
  766. if shift >= 64 {
  767. return ErrIntOverflowTypes
  768. }
  769. if iNdEx >= l {
  770. return io.ErrUnexpectedEOF
  771. }
  772. b := dAtA[iNdEx]
  773. iNdEx++
  774. msglen |= (int(b) & 0x7F) << shift
  775. if b < 0x80 {
  776. break
  777. }
  778. }
  779. if msglen < 0 {
  780. return ErrInvalidLengthTypes
  781. }
  782. postIndex := iNdEx + msglen
  783. if postIndex > l {
  784. return io.ErrUnexpectedEOF
  785. }
  786. if m.DeliverTx == nil {
  787. m.DeliverTx = &types.ResponseDeliverTx{}
  788. }
  789. if err := m.DeliverTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  790. return err
  791. }
  792. iNdEx = postIndex
  793. default:
  794. iNdEx = preIndex
  795. skippy, err := skipTypes(dAtA[iNdEx:])
  796. if err != nil {
  797. return err
  798. }
  799. if skippy < 0 {
  800. return ErrInvalidLengthTypes
  801. }
  802. if (iNdEx + skippy) > l {
  803. return io.ErrUnexpectedEOF
  804. }
  805. iNdEx += skippy
  806. }
  807. }
  808. if iNdEx > l {
  809. return io.ErrUnexpectedEOF
  810. }
  811. return nil
  812. }
  813. func skipTypes(dAtA []byte) (n int, err error) {
  814. l := len(dAtA)
  815. iNdEx := 0
  816. for iNdEx < l {
  817. var wire uint64
  818. for shift := uint(0); ; shift += 7 {
  819. if shift >= 64 {
  820. return 0, ErrIntOverflowTypes
  821. }
  822. if iNdEx >= l {
  823. return 0, io.ErrUnexpectedEOF
  824. }
  825. b := dAtA[iNdEx]
  826. iNdEx++
  827. wire |= (uint64(b) & 0x7F) << shift
  828. if b < 0x80 {
  829. break
  830. }
  831. }
  832. wireType := int(wire & 0x7)
  833. switch wireType {
  834. case 0:
  835. for shift := uint(0); ; shift += 7 {
  836. if shift >= 64 {
  837. return 0, ErrIntOverflowTypes
  838. }
  839. if iNdEx >= l {
  840. return 0, io.ErrUnexpectedEOF
  841. }
  842. iNdEx++
  843. if dAtA[iNdEx-1] < 0x80 {
  844. break
  845. }
  846. }
  847. return iNdEx, nil
  848. case 1:
  849. iNdEx += 8
  850. return iNdEx, nil
  851. case 2:
  852. var length int
  853. for shift := uint(0); ; shift += 7 {
  854. if shift >= 64 {
  855. return 0, ErrIntOverflowTypes
  856. }
  857. if iNdEx >= l {
  858. return 0, io.ErrUnexpectedEOF
  859. }
  860. b := dAtA[iNdEx]
  861. iNdEx++
  862. length |= (int(b) & 0x7F) << shift
  863. if b < 0x80 {
  864. break
  865. }
  866. }
  867. iNdEx += length
  868. if length < 0 {
  869. return 0, ErrInvalidLengthTypes
  870. }
  871. return iNdEx, nil
  872. case 3:
  873. for {
  874. var innerWire uint64
  875. var start int = iNdEx
  876. for shift := uint(0); ; shift += 7 {
  877. if shift >= 64 {
  878. return 0, ErrIntOverflowTypes
  879. }
  880. if iNdEx >= l {
  881. return 0, io.ErrUnexpectedEOF
  882. }
  883. b := dAtA[iNdEx]
  884. iNdEx++
  885. innerWire |= (uint64(b) & 0x7F) << shift
  886. if b < 0x80 {
  887. break
  888. }
  889. }
  890. innerWireType := int(innerWire & 0x7)
  891. if innerWireType == 4 {
  892. break
  893. }
  894. next, err := skipTypes(dAtA[start:])
  895. if err != nil {
  896. return 0, err
  897. }
  898. iNdEx = start + next
  899. }
  900. return iNdEx, nil
  901. case 4:
  902. return iNdEx, nil
  903. case 5:
  904. iNdEx += 4
  905. return iNdEx, nil
  906. default:
  907. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  908. }
  909. }
  910. panic("unreachable")
  911. }
  912. var (
  913. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  914. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  915. )
  916. func init() { proto.RegisterFile("rpc/grpc/types.proto", fileDescriptorTypes) }
  917. func init() { golang_proto.RegisterFile("rpc/grpc/types.proto", fileDescriptorTypes) }
  918. var fileDescriptorTypes = []byte{
  919. // 321 bytes of a gzipped FileDescriptorProto
  920. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x2a, 0x48, 0xd6,
  921. 0x4f, 0x07, 0x11, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c,
  922. 0xc9, 0xf9, 0x45, 0xa9, 0xf1, 0x20, 0x61, 0x29, 0xdd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd,
  923. 0xe4, 0xfc, 0x5c, 0xfd, 0xf4, 0xfc, 0xf4, 0x7c, 0x7d, 0xb0, 0x8a, 0xa4, 0xd2, 0x34, 0x30, 0x0f,
  924. 0xcc, 0x01, 0xb3, 0x20, 0x3a, 0xa5, 0xcc, 0x91, 0x94, 0x97, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5,
  925. 0x66, 0xe6, 0x95, 0x20, 0x33, 0x13, 0x93, 0x92, 0x33, 0x21, 0x96, 0x21, 0x5b, 0xa9, 0xc4, 0xcb,
  926. 0xc5, 0x1d, 0x94, 0x5a, 0x58, 0x9a, 0x5a, 0x5c, 0x12, 0x90, 0x99, 0x97, 0xae, 0xa4, 0xc2, 0x25,
  927. 0x04, 0xe5, 0x3a, 0x15, 0xe5, 0x27, 0xa6, 0x24, 0x27, 0x16, 0x97, 0x84, 0x54, 0x08, 0xf1, 0x71,
  928. 0x31, 0x95, 0x54, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x31, 0x95, 0x54, 0x28, 0xf1, 0x71,
  929. 0xf1, 0x04, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x82, 0x75, 0x35, 0x32, 0x72, 0x09, 0xc3,
  930. 0x04, 0x90, 0xf5, 0x19, 0x72, 0x71, 0x24, 0x67, 0xa4, 0x26, 0x67, 0xc7, 0x43, 0x75, 0x73, 0x1b,
  931. 0x89, 0xe9, 0x41, 0x2c, 0x87, 0xa9, 0x76, 0x06, 0x49, 0x87, 0x54, 0x04, 0xb1, 0x27, 0x43, 0x18,
  932. 0x42, 0xe6, 0x5c, 0x5c, 0x29, 0xa9, 0x39, 0x99, 0x65, 0xa9, 0x45, 0x20, 0x4d, 0x4c, 0x60, 0x4d,
  933. 0x12, 0x68, 0x9a, 0x5c, 0x20, 0x0a, 0x42, 0x2a, 0x82, 0x38, 0x53, 0x60, 0x4c, 0xa3, 0xa9, 0x8c,
  934. 0x5c, 0x3c, 0x70, 0xbb, 0x1d, 0x03, 0x3c, 0x85, 0xcc, 0xb9, 0x58, 0x40, 0x8e, 0x13, 0x12, 0xd3,
  935. 0x83, 0x87, 0xaa, 0x1e, 0x92, 0x57, 0xa5, 0xc4, 0x51, 0xc4, 0x11, 0xbe, 0x11, 0xf2, 0xe1, 0xe2,
  936. 0x46, 0xf6, 0x84, 0x2c, 0xa6, 0x7e, 0x24, 0x69, 0x29, 0x39, 0x2c, 0xc6, 0x20, 0xc9, 0x3b, 0xc9,
  937. 0xfc, 0x78, 0x28, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x8e, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9,
  938. 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x81, 0xc7, 0x72, 0x8c, 0x49, 0x6c,
  939. 0xe0, 0x58, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xa8, 0xe4, 0xd9, 0x10, 0x02, 0x00,
  940. 0x00,
  941. }