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.

1238 lines
31 KiB

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