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.

924 lines
24 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: tendermint/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_0ffff5682c662b95, []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_0ffff5682c662b95, []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_0ffff5682c662b95, []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_0ffff5682c662b95, []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("tendermint/rpc/grpc/types.proto", fileDescriptor_0ffff5682c662b95) }
  185. var fileDescriptor_0ffff5682c662b95 = []byte{
  186. // 316 bytes of a gzipped FileDescriptorProto
  187. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0x49, 0xcd, 0x4b,
  188. 0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0x2a, 0x48, 0xd6, 0x4f, 0x07, 0x11, 0x25, 0x95,
  189. 0x05, 0xa9, 0xc5, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xc2, 0x08, 0x05, 0x7a, 0x45, 0x05,
  190. 0xc9, 0x7a, 0x20, 0x05, 0x52, 0xd2, 0x48, 0xba, 0x12, 0x93, 0x92, 0x33, 0x91, 0x75, 0x28, 0xf1,
  191. 0x72, 0x71, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x04, 0x64, 0xe6, 0xa5, 0x2b, 0xa9, 0x70,
  192. 0x09, 0x41, 0xb9, 0x4e, 0x45, 0xf9, 0x89, 0x29, 0xc9, 0x89, 0xc5, 0x25, 0x21, 0x15, 0x42, 0x7c,
  193. 0x5c, 0x4c, 0x25, 0x15, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x4c, 0x25, 0x15, 0x4a, 0x7c,
  194. 0x5c, 0x3c, 0x41, 0xa9, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x60, 0x5d, 0x53, 0x19, 0xb9, 0x84,
  195. 0x61, 0x02, 0xc8, 0xfa, 0xac, 0xb9, 0x38, 0x92, 0x33, 0x52, 0x93, 0xb3, 0xe3, 0xa1, 0xba, 0xb9,
  196. 0x8d, 0x14, 0xf4, 0x90, 0x5c, 0x08, 0x72, 0x8c, 0x1e, 0x4c, 0x9f, 0x33, 0x48, 0x61, 0x48, 0x45,
  197. 0x10, 0x7b, 0x32, 0x84, 0x21, 0xe4, 0xc8, 0xc5, 0x95, 0x92, 0x9a, 0x93, 0x59, 0x96, 0x5a, 0x04,
  198. 0xd2, 0xce, 0x04, 0xd6, 0xae, 0x84, 0x53, 0xbb, 0x0b, 0x44, 0x69, 0x48, 0x45, 0x10, 0x67, 0x0a,
  199. 0x8c, 0x69, 0xb4, 0x97, 0x91, 0x8b, 0x07, 0xee, 0x1e, 0xc7, 0x00, 0x4f, 0x21, 0x6f, 0x2e, 0x16,
  200. 0x90, 0x83, 0x85, 0x50, 0x9c, 0x01, 0x0b, 0x28, 0x3d, 0xa4, 0x80, 0x90, 0x52, 0xc4, 0xa1, 0x02,
  201. 0xe1, 0x6b, 0xa1, 0x04, 0x2e, 0x6e, 0x64, 0xcf, 0xaa, 0xe3, 0x33, 0x13, 0x49, 0xa1, 0x94, 0x06,
  202. 0x5e, 0xa3, 0x91, 0x54, 0x3a, 0xf9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83,
  203. 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43,
  204. 0x94, 0x51, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x52, 0xf4, 0x62,
  205. 0x49, 0x1f, 0xd6, 0xc9, 0xf9, 0x45, 0xa9, 0x20, 0x46, 0x12, 0x1b, 0x38, 0xc6, 0x8d, 0x01, 0x01,
  206. 0x00, 0x00, 0xff, 0xff, 0xf6, 0x4b, 0x02, 0xd8, 0x46, 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: "tendermint/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) || (iNdEx+skippy) < 0 {
  518. return ErrInvalidLengthTypes
  519. }
  520. if (iNdEx + skippy) > l {
  521. return io.ErrUnexpectedEOF
  522. }
  523. iNdEx += skippy
  524. }
  525. }
  526. if iNdEx > l {
  527. return io.ErrUnexpectedEOF
  528. }
  529. return nil
  530. }
  531. func (m *RequestBroadcastTx) Unmarshal(dAtA []byte) error {
  532. l := len(dAtA)
  533. iNdEx := 0
  534. for iNdEx < l {
  535. preIndex := iNdEx
  536. var wire uint64
  537. for shift := uint(0); ; shift += 7 {
  538. if shift >= 64 {
  539. return ErrIntOverflowTypes
  540. }
  541. if iNdEx >= l {
  542. return io.ErrUnexpectedEOF
  543. }
  544. b := dAtA[iNdEx]
  545. iNdEx++
  546. wire |= uint64(b&0x7F) << shift
  547. if b < 0x80 {
  548. break
  549. }
  550. }
  551. fieldNum := int32(wire >> 3)
  552. wireType := int(wire & 0x7)
  553. if wireType == 4 {
  554. return fmt.Errorf("proto: RequestBroadcastTx: wiretype end group for non-group")
  555. }
  556. if fieldNum <= 0 {
  557. return fmt.Errorf("proto: RequestBroadcastTx: illegal tag %d (wire type %d)", fieldNum, wire)
  558. }
  559. switch fieldNum {
  560. case 1:
  561. if wireType != 2 {
  562. return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
  563. }
  564. var byteLen int
  565. for shift := uint(0); ; shift += 7 {
  566. if shift >= 64 {
  567. return ErrIntOverflowTypes
  568. }
  569. if iNdEx >= l {
  570. return io.ErrUnexpectedEOF
  571. }
  572. b := dAtA[iNdEx]
  573. iNdEx++
  574. byteLen |= int(b&0x7F) << shift
  575. if b < 0x80 {
  576. break
  577. }
  578. }
  579. if byteLen < 0 {
  580. return ErrInvalidLengthTypes
  581. }
  582. postIndex := iNdEx + byteLen
  583. if postIndex < 0 {
  584. return ErrInvalidLengthTypes
  585. }
  586. if postIndex > l {
  587. return io.ErrUnexpectedEOF
  588. }
  589. m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...)
  590. if m.Tx == nil {
  591. m.Tx = []byte{}
  592. }
  593. iNdEx = postIndex
  594. default:
  595. iNdEx = preIndex
  596. skippy, err := skipTypes(dAtA[iNdEx:])
  597. if err != nil {
  598. return err
  599. }
  600. if (skippy < 0) || (iNdEx+skippy) < 0 {
  601. return ErrInvalidLengthTypes
  602. }
  603. if (iNdEx + skippy) > l {
  604. return io.ErrUnexpectedEOF
  605. }
  606. iNdEx += skippy
  607. }
  608. }
  609. if iNdEx > l {
  610. return io.ErrUnexpectedEOF
  611. }
  612. return nil
  613. }
  614. func (m *ResponsePing) Unmarshal(dAtA []byte) error {
  615. l := len(dAtA)
  616. iNdEx := 0
  617. for iNdEx < l {
  618. preIndex := iNdEx
  619. var wire uint64
  620. for shift := uint(0); ; shift += 7 {
  621. if shift >= 64 {
  622. return ErrIntOverflowTypes
  623. }
  624. if iNdEx >= l {
  625. return io.ErrUnexpectedEOF
  626. }
  627. b := dAtA[iNdEx]
  628. iNdEx++
  629. wire |= uint64(b&0x7F) << shift
  630. if b < 0x80 {
  631. break
  632. }
  633. }
  634. fieldNum := int32(wire >> 3)
  635. wireType := int(wire & 0x7)
  636. if wireType == 4 {
  637. return fmt.Errorf("proto: ResponsePing: wiretype end group for non-group")
  638. }
  639. if fieldNum <= 0 {
  640. return fmt.Errorf("proto: ResponsePing: illegal tag %d (wire type %d)", fieldNum, wire)
  641. }
  642. switch fieldNum {
  643. default:
  644. iNdEx = preIndex
  645. skippy, err := skipTypes(dAtA[iNdEx:])
  646. if err != nil {
  647. return err
  648. }
  649. if (skippy < 0) || (iNdEx+skippy) < 0 {
  650. return ErrInvalidLengthTypes
  651. }
  652. if (iNdEx + skippy) > l {
  653. return io.ErrUnexpectedEOF
  654. }
  655. iNdEx += skippy
  656. }
  657. }
  658. if iNdEx > l {
  659. return io.ErrUnexpectedEOF
  660. }
  661. return nil
  662. }
  663. func (m *ResponseBroadcastTx) Unmarshal(dAtA []byte) error {
  664. l := len(dAtA)
  665. iNdEx := 0
  666. for iNdEx < l {
  667. preIndex := iNdEx
  668. var wire uint64
  669. for shift := uint(0); ; shift += 7 {
  670. if shift >= 64 {
  671. return ErrIntOverflowTypes
  672. }
  673. if iNdEx >= l {
  674. return io.ErrUnexpectedEOF
  675. }
  676. b := dAtA[iNdEx]
  677. iNdEx++
  678. wire |= uint64(b&0x7F) << shift
  679. if b < 0x80 {
  680. break
  681. }
  682. }
  683. fieldNum := int32(wire >> 3)
  684. wireType := int(wire & 0x7)
  685. if wireType == 4 {
  686. return fmt.Errorf("proto: ResponseBroadcastTx: wiretype end group for non-group")
  687. }
  688. if fieldNum <= 0 {
  689. return fmt.Errorf("proto: ResponseBroadcastTx: illegal tag %d (wire type %d)", fieldNum, wire)
  690. }
  691. switch fieldNum {
  692. case 1:
  693. if wireType != 2 {
  694. return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType)
  695. }
  696. var msglen int
  697. for shift := uint(0); ; shift += 7 {
  698. if shift >= 64 {
  699. return ErrIntOverflowTypes
  700. }
  701. if iNdEx >= l {
  702. return io.ErrUnexpectedEOF
  703. }
  704. b := dAtA[iNdEx]
  705. iNdEx++
  706. msglen |= int(b&0x7F) << shift
  707. if b < 0x80 {
  708. break
  709. }
  710. }
  711. if msglen < 0 {
  712. return ErrInvalidLengthTypes
  713. }
  714. postIndex := iNdEx + msglen
  715. if postIndex < 0 {
  716. return ErrInvalidLengthTypes
  717. }
  718. if postIndex > l {
  719. return io.ErrUnexpectedEOF
  720. }
  721. if m.CheckTx == nil {
  722. m.CheckTx = &types.ResponseCheckTx{}
  723. }
  724. if err := m.CheckTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  725. return err
  726. }
  727. iNdEx = postIndex
  728. case 2:
  729. if wireType != 2 {
  730. return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType)
  731. }
  732. var msglen int
  733. for shift := uint(0); ; shift += 7 {
  734. if shift >= 64 {
  735. return ErrIntOverflowTypes
  736. }
  737. if iNdEx >= l {
  738. return io.ErrUnexpectedEOF
  739. }
  740. b := dAtA[iNdEx]
  741. iNdEx++
  742. msglen |= int(b&0x7F) << shift
  743. if b < 0x80 {
  744. break
  745. }
  746. }
  747. if msglen < 0 {
  748. return ErrInvalidLengthTypes
  749. }
  750. postIndex := iNdEx + msglen
  751. if postIndex < 0 {
  752. return ErrInvalidLengthTypes
  753. }
  754. if postIndex > l {
  755. return io.ErrUnexpectedEOF
  756. }
  757. if m.DeliverTx == nil {
  758. m.DeliverTx = &types.ResponseDeliverTx{}
  759. }
  760. if err := m.DeliverTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  761. return err
  762. }
  763. iNdEx = postIndex
  764. default:
  765. iNdEx = preIndex
  766. skippy, err := skipTypes(dAtA[iNdEx:])
  767. if err != nil {
  768. return err
  769. }
  770. if (skippy < 0) || (iNdEx+skippy) < 0 {
  771. return ErrInvalidLengthTypes
  772. }
  773. if (iNdEx + skippy) > l {
  774. return io.ErrUnexpectedEOF
  775. }
  776. iNdEx += skippy
  777. }
  778. }
  779. if iNdEx > l {
  780. return io.ErrUnexpectedEOF
  781. }
  782. return nil
  783. }
  784. func skipTypes(dAtA []byte) (n int, err error) {
  785. l := len(dAtA)
  786. iNdEx := 0
  787. depth := 0
  788. for iNdEx < l {
  789. var wire uint64
  790. for shift := uint(0); ; shift += 7 {
  791. if shift >= 64 {
  792. return 0, ErrIntOverflowTypes
  793. }
  794. if iNdEx >= l {
  795. return 0, io.ErrUnexpectedEOF
  796. }
  797. b := dAtA[iNdEx]
  798. iNdEx++
  799. wire |= (uint64(b) & 0x7F) << shift
  800. if b < 0x80 {
  801. break
  802. }
  803. }
  804. wireType := int(wire & 0x7)
  805. switch wireType {
  806. case 0:
  807. for shift := uint(0); ; shift += 7 {
  808. if shift >= 64 {
  809. return 0, ErrIntOverflowTypes
  810. }
  811. if iNdEx >= l {
  812. return 0, io.ErrUnexpectedEOF
  813. }
  814. iNdEx++
  815. if dAtA[iNdEx-1] < 0x80 {
  816. break
  817. }
  818. }
  819. case 1:
  820. iNdEx += 8
  821. case 2:
  822. var length int
  823. for shift := uint(0); ; shift += 7 {
  824. if shift >= 64 {
  825. return 0, ErrIntOverflowTypes
  826. }
  827. if iNdEx >= l {
  828. return 0, io.ErrUnexpectedEOF
  829. }
  830. b := dAtA[iNdEx]
  831. iNdEx++
  832. length |= (int(b) & 0x7F) << shift
  833. if b < 0x80 {
  834. break
  835. }
  836. }
  837. if length < 0 {
  838. return 0, ErrInvalidLengthTypes
  839. }
  840. iNdEx += length
  841. case 3:
  842. depth++
  843. case 4:
  844. if depth == 0 {
  845. return 0, ErrUnexpectedEndOfGroupTypes
  846. }
  847. depth--
  848. case 5:
  849. iNdEx += 4
  850. default:
  851. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  852. }
  853. if iNdEx < 0 {
  854. return 0, ErrInvalidLengthTypes
  855. }
  856. if depth == 0 {
  857. return iNdEx, nil
  858. }
  859. }
  860. return 0, io.ErrUnexpectedEOF
  861. }
  862. var (
  863. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  864. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  865. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  866. )