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.

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