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.

936 lines
24 KiB

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