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.

1164 lines
29 KiB

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