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.

1174 lines
29 KiB

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