github.com/noirx94/tendermintmp@v0.0.1/rpc/grpc/types.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/rpc/grpc/types.proto 3 4 package coregrpc 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/gogo/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 19 // Reference imports to suppress errors if they are not otherwise used. 20 var _ = proto.Marshal 21 var _ = fmt.Errorf 22 var _ = math.Inf 23 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 30 type RequestPing struct { 31 } 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_0ffff5682c662b95, []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 64 var xxx_messageInfo_RequestPing proto.InternalMessageInfo 65 66 type RequestBroadcastTx struct { 67 Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` 68 } 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_0ffff5682c662b95, []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 101 var xxx_messageInfo_RequestBroadcastTx proto.InternalMessageInfo 102 103 func (m *RequestBroadcastTx) GetTx() []byte { 104 if m != nil { 105 return m.Tx 106 } 107 return nil 108 } 109 110 type ResponsePing struct { 111 } 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_0ffff5682c662b95, []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 144 var xxx_messageInfo_ResponsePing proto.InternalMessageInfo 145 146 type ResponseBroadcastTx struct { 147 CheckTx *types.ResponseCheckTx `protobuf:"bytes,1,opt,name=check_tx,json=checkTx,proto3" json:"check_tx,omitempty"` 148 DeliverTx *types.ResponseDeliverTx `protobuf:"bytes,2,opt,name=deliver_tx,json=deliverTx,proto3" json:"deliver_tx,omitempty"` 149 } 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_0ffff5682c662b95, []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 182 var xxx_messageInfo_ResponseBroadcastTx proto.InternalMessageInfo 183 184 func (m *ResponseBroadcastTx) GetCheckTx() *types.ResponseCheckTx { 185 if m != nil { 186 return m.CheckTx 187 } 188 return nil 189 } 190 191 func (m *ResponseBroadcastTx) GetDeliverTx() *types.ResponseDeliverTx { 192 if m != nil { 193 return m.DeliverTx 194 } 195 return nil 196 } 197 198 func init() { 199 proto.RegisterType((*RequestPing)(nil), "tendermint.rpc.grpc.RequestPing") 200 proto.RegisterType((*RequestBroadcastTx)(nil), "tendermint.rpc.grpc.RequestBroadcastTx") 201 proto.RegisterType((*ResponsePing)(nil), "tendermint.rpc.grpc.ResponsePing") 202 proto.RegisterType((*ResponseBroadcastTx)(nil), "tendermint.rpc.grpc.ResponseBroadcastTx") 203 } 204 205 func init() { proto.RegisterFile("tendermint/rpc/grpc/types.proto", fileDescriptor_0ffff5682c662b95) } 206 207 var fileDescriptor_0ffff5682c662b95 = []byte{ 208 // 316 bytes of a gzipped FileDescriptorProto 209 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0x49, 0xcd, 0x4b, 210 0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0x2a, 0x48, 0xd6, 0x4f, 0x07, 0x11, 0x25, 0x95, 211 0x05, 0xa9, 0xc5, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xc2, 0x08, 0x05, 0x7a, 0x45, 0x05, 212 0xc9, 0x7a, 0x20, 0x05, 0x52, 0xd2, 0x48, 0xba, 0x12, 0x93, 0x92, 0x33, 0x91, 0x75, 0x28, 0xf1, 213 0x72, 0x71, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x04, 0x64, 0xe6, 0xa5, 0x2b, 0xa9, 0x70, 214 0x09, 0x41, 0xb9, 0x4e, 0x45, 0xf9, 0x89, 0x29, 0xc9, 0x89, 0xc5, 0x25, 0x21, 0x15, 0x42, 0x7c, 215 0x5c, 0x4c, 0x25, 0x15, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x4c, 0x25, 0x15, 0x4a, 0x7c, 216 0x5c, 0x3c, 0x41, 0xa9, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x60, 0x5d, 0x53, 0x19, 0xb9, 0x84, 217 0x61, 0x02, 0xc8, 0xfa, 0xac, 0xb9, 0x38, 0x92, 0x33, 0x52, 0x93, 0xb3, 0xe3, 0xa1, 0xba, 0xb9, 218 0x8d, 0x14, 0xf4, 0x90, 0x5c, 0x08, 0x72, 0x8c, 0x1e, 0x4c, 0x9f, 0x33, 0x48, 0x61, 0x48, 0x45, 219 0x10, 0x7b, 0x32, 0x84, 0x21, 0xe4, 0xc8, 0xc5, 0x95, 0x92, 0x9a, 0x93, 0x59, 0x96, 0x5a, 0x04, 220 0xd2, 0xce, 0x04, 0xd6, 0xae, 0x84, 0x53, 0xbb, 0x0b, 0x44, 0x69, 0x48, 0x45, 0x10, 0x67, 0x0a, 221 0x8c, 0x69, 0xb4, 0x97, 0x91, 0x8b, 0x07, 0xee, 0x1e, 0xc7, 0x00, 0x4f, 0x21, 0x6f, 0x2e, 0x16, 222 0x90, 0x83, 0x85, 0x50, 0x9c, 0x01, 0x0b, 0x28, 0x3d, 0xa4, 0x80, 0x90, 0x52, 0xc4, 0xa1, 0x02, 223 0xe1, 0x6b, 0xa1, 0x04, 0x2e, 0x6e, 0x64, 0xcf, 0xaa, 0xe3, 0x33, 0x13, 0x49, 0xa1, 0x94, 0x06, 224 0x5e, 0xa3, 0x91, 0x54, 0x3a, 0xf9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 225 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 226 0x94, 0x51, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x52, 0xf4, 0x62, 227 0x49, 0x1f, 0xd6, 0xc9, 0xf9, 0x45, 0xa9, 0x20, 0x46, 0x12, 0x1b, 0x38, 0xc6, 0x8d, 0x01, 0x01, 228 0x00, 0x00, 0xff, 0xff, 0xf6, 0x4b, 0x02, 0xd8, 0x46, 0x02, 0x00, 0x00, 229 } 230 231 // Reference imports to suppress errors if they are not otherwise used. 232 var _ context.Context 233 var _ grpc.ClientConn 234 235 // This is a compile-time assertion to ensure that this generated file 236 // is compatible with the grpc package it is being compiled against. 237 const _ = grpc.SupportPackageIsVersion4 238 239 // BroadcastAPIClient is the client API for BroadcastAPI service. 240 // 241 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 242 type BroadcastAPIClient interface { 243 Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error) 244 BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error) 245 } 246 247 type broadcastAPIClient struct { 248 cc *grpc.ClientConn 249 } 250 251 func NewBroadcastAPIClient(cc *grpc.ClientConn) BroadcastAPIClient { 252 return &broadcastAPIClient{cc} 253 } 254 255 func (c *broadcastAPIClient) Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error) { 256 out := new(ResponsePing) 257 err := c.cc.Invoke(ctx, "/tendermint.rpc.grpc.BroadcastAPI/Ping", in, out, opts...) 258 if err != nil { 259 return nil, err 260 } 261 return out, nil 262 } 263 264 func (c *broadcastAPIClient) BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error) { 265 out := new(ResponseBroadcastTx) 266 err := c.cc.Invoke(ctx, "/tendermint.rpc.grpc.BroadcastAPI/BroadcastTx", in, out, opts...) 267 if err != nil { 268 return nil, err 269 } 270 return out, nil 271 } 272 273 // BroadcastAPIServer is the server API for BroadcastAPI service. 274 type BroadcastAPIServer interface { 275 Ping(context.Context, *RequestPing) (*ResponsePing, error) 276 BroadcastTx(context.Context, *RequestBroadcastTx) (*ResponseBroadcastTx, error) 277 } 278 279 // UnimplementedBroadcastAPIServer can be embedded to have forward compatible implementations. 280 type UnimplementedBroadcastAPIServer struct { 281 } 282 283 func (*UnimplementedBroadcastAPIServer) Ping(ctx context.Context, req *RequestPing) (*ResponsePing, error) { 284 return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") 285 } 286 func (*UnimplementedBroadcastAPIServer) BroadcastTx(ctx context.Context, req *RequestBroadcastTx) (*ResponseBroadcastTx, error) { 287 return nil, status.Errorf(codes.Unimplemented, "method BroadcastTx not implemented") 288 } 289 290 func RegisterBroadcastAPIServer(s *grpc.Server, srv BroadcastAPIServer) { 291 s.RegisterService(&_BroadcastAPI_serviceDesc, srv) 292 } 293 294 func _BroadcastAPI_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 295 in := new(RequestPing) 296 if err := dec(in); err != nil { 297 return nil, err 298 } 299 if interceptor == nil { 300 return srv.(BroadcastAPIServer).Ping(ctx, in) 301 } 302 info := &grpc.UnaryServerInfo{ 303 Server: srv, 304 FullMethod: "/tendermint.rpc.grpc.BroadcastAPI/Ping", 305 } 306 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 307 return srv.(BroadcastAPIServer).Ping(ctx, req.(*RequestPing)) 308 } 309 return interceptor(ctx, in, info, handler) 310 } 311 312 func _BroadcastAPI_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 313 in := new(RequestBroadcastTx) 314 if err := dec(in); err != nil { 315 return nil, err 316 } 317 if interceptor == nil { 318 return srv.(BroadcastAPIServer).BroadcastTx(ctx, in) 319 } 320 info := &grpc.UnaryServerInfo{ 321 Server: srv, 322 FullMethod: "/tendermint.rpc.grpc.BroadcastAPI/BroadcastTx", 323 } 324 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 325 return srv.(BroadcastAPIServer).BroadcastTx(ctx, req.(*RequestBroadcastTx)) 326 } 327 return interceptor(ctx, in, info, handler) 328 } 329 330 var _BroadcastAPI_serviceDesc = grpc.ServiceDesc{ 331 ServiceName: "tendermint.rpc.grpc.BroadcastAPI", 332 HandlerType: (*BroadcastAPIServer)(nil), 333 Methods: []grpc.MethodDesc{ 334 { 335 MethodName: "Ping", 336 Handler: _BroadcastAPI_Ping_Handler, 337 }, 338 { 339 MethodName: "BroadcastTx", 340 Handler: _BroadcastAPI_BroadcastTx_Handler, 341 }, 342 }, 343 Streams: []grpc.StreamDesc{}, 344 Metadata: "tendermint/rpc/grpc/types.proto", 345 } 346 347 func (m *RequestPing) Marshal() (dAtA []byte, err error) { 348 size := m.Size() 349 dAtA = make([]byte, size) 350 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 351 if err != nil { 352 return nil, err 353 } 354 return dAtA[:n], nil 355 } 356 357 func (m *RequestPing) MarshalTo(dAtA []byte) (int, error) { 358 size := m.Size() 359 return m.MarshalToSizedBuffer(dAtA[:size]) 360 } 361 362 func (m *RequestPing) MarshalToSizedBuffer(dAtA []byte) (int, error) { 363 i := len(dAtA) 364 _ = i 365 var l int 366 _ = l 367 return len(dAtA) - i, nil 368 } 369 370 func (m *RequestBroadcastTx) Marshal() (dAtA []byte, err error) { 371 size := m.Size() 372 dAtA = make([]byte, size) 373 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 374 if err != nil { 375 return nil, err 376 } 377 return dAtA[:n], nil 378 } 379 380 func (m *RequestBroadcastTx) MarshalTo(dAtA []byte) (int, error) { 381 size := m.Size() 382 return m.MarshalToSizedBuffer(dAtA[:size]) 383 } 384 385 func (m *RequestBroadcastTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { 386 i := len(dAtA) 387 _ = i 388 var l int 389 _ = l 390 if len(m.Tx) > 0 { 391 i -= len(m.Tx) 392 copy(dAtA[i:], m.Tx) 393 i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx))) 394 i-- 395 dAtA[i] = 0xa 396 } 397 return len(dAtA) - i, nil 398 } 399 400 func (m *ResponsePing) Marshal() (dAtA []byte, err error) { 401 size := m.Size() 402 dAtA = make([]byte, size) 403 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 404 if err != nil { 405 return nil, err 406 } 407 return dAtA[:n], nil 408 } 409 410 func (m *ResponsePing) MarshalTo(dAtA []byte) (int, error) { 411 size := m.Size() 412 return m.MarshalToSizedBuffer(dAtA[:size]) 413 } 414 415 func (m *ResponsePing) MarshalToSizedBuffer(dAtA []byte) (int, error) { 416 i := len(dAtA) 417 _ = i 418 var l int 419 _ = l 420 return len(dAtA) - i, nil 421 } 422 423 func (m *ResponseBroadcastTx) Marshal() (dAtA []byte, err error) { 424 size := m.Size() 425 dAtA = make([]byte, size) 426 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 427 if err != nil { 428 return nil, err 429 } 430 return dAtA[:n], nil 431 } 432 433 func (m *ResponseBroadcastTx) MarshalTo(dAtA []byte) (int, error) { 434 size := m.Size() 435 return m.MarshalToSizedBuffer(dAtA[:size]) 436 } 437 438 func (m *ResponseBroadcastTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { 439 i := len(dAtA) 440 _ = i 441 var l int 442 _ = l 443 if m.DeliverTx != nil { 444 { 445 size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i]) 446 if err != nil { 447 return 0, err 448 } 449 i -= size 450 i = encodeVarintTypes(dAtA, i, uint64(size)) 451 } 452 i-- 453 dAtA[i] = 0x12 454 } 455 if m.CheckTx != nil { 456 { 457 size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i]) 458 if err != nil { 459 return 0, err 460 } 461 i -= size 462 i = encodeVarintTypes(dAtA, i, uint64(size)) 463 } 464 i-- 465 dAtA[i] = 0xa 466 } 467 return len(dAtA) - i, nil 468 } 469 470 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 471 offset -= sovTypes(v) 472 base := offset 473 for v >= 1<<7 { 474 dAtA[offset] = uint8(v&0x7f | 0x80) 475 v >>= 7 476 offset++ 477 } 478 dAtA[offset] = uint8(v) 479 return base 480 } 481 func (m *RequestPing) Size() (n int) { 482 if m == nil { 483 return 0 484 } 485 var l int 486 _ = l 487 return n 488 } 489 490 func (m *RequestBroadcastTx) Size() (n int) { 491 if m == nil { 492 return 0 493 } 494 var l int 495 _ = l 496 l = len(m.Tx) 497 if l > 0 { 498 n += 1 + l + sovTypes(uint64(l)) 499 } 500 return n 501 } 502 503 func (m *ResponsePing) Size() (n int) { 504 if m == nil { 505 return 0 506 } 507 var l int 508 _ = l 509 return n 510 } 511 512 func (m *ResponseBroadcastTx) Size() (n int) { 513 if m == nil { 514 return 0 515 } 516 var l int 517 _ = l 518 if m.CheckTx != nil { 519 l = m.CheckTx.Size() 520 n += 1 + l + sovTypes(uint64(l)) 521 } 522 if m.DeliverTx != nil { 523 l = m.DeliverTx.Size() 524 n += 1 + l + sovTypes(uint64(l)) 525 } 526 return n 527 } 528 529 func sovTypes(x uint64) (n int) { 530 return (math_bits.Len64(x|1) + 6) / 7 531 } 532 func sozTypes(x uint64) (n int) { 533 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 534 } 535 func (m *RequestPing) Unmarshal(dAtA []byte) error { 536 l := len(dAtA) 537 iNdEx := 0 538 for iNdEx < l { 539 preIndex := iNdEx 540 var wire uint64 541 for shift := uint(0); ; shift += 7 { 542 if shift >= 64 { 543 return ErrIntOverflowTypes 544 } 545 if iNdEx >= l { 546 return io.ErrUnexpectedEOF 547 } 548 b := dAtA[iNdEx] 549 iNdEx++ 550 wire |= uint64(b&0x7F) << shift 551 if b < 0x80 { 552 break 553 } 554 } 555 fieldNum := int32(wire >> 3) 556 wireType := int(wire & 0x7) 557 if wireType == 4 { 558 return fmt.Errorf("proto: RequestPing: wiretype end group for non-group") 559 } 560 if fieldNum <= 0 { 561 return fmt.Errorf("proto: RequestPing: illegal tag %d (wire type %d)", fieldNum, wire) 562 } 563 switch fieldNum { 564 default: 565 iNdEx = preIndex 566 skippy, err := skipTypes(dAtA[iNdEx:]) 567 if err != nil { 568 return err 569 } 570 if (skippy < 0) || (iNdEx+skippy) < 0 { 571 return ErrInvalidLengthTypes 572 } 573 if (iNdEx + skippy) > l { 574 return io.ErrUnexpectedEOF 575 } 576 iNdEx += skippy 577 } 578 } 579 580 if iNdEx > l { 581 return io.ErrUnexpectedEOF 582 } 583 return nil 584 } 585 func (m *RequestBroadcastTx) Unmarshal(dAtA []byte) error { 586 l := len(dAtA) 587 iNdEx := 0 588 for iNdEx < l { 589 preIndex := iNdEx 590 var wire uint64 591 for shift := uint(0); ; shift += 7 { 592 if shift >= 64 { 593 return ErrIntOverflowTypes 594 } 595 if iNdEx >= l { 596 return io.ErrUnexpectedEOF 597 } 598 b := dAtA[iNdEx] 599 iNdEx++ 600 wire |= uint64(b&0x7F) << shift 601 if b < 0x80 { 602 break 603 } 604 } 605 fieldNum := int32(wire >> 3) 606 wireType := int(wire & 0x7) 607 if wireType == 4 { 608 return fmt.Errorf("proto: RequestBroadcastTx: wiretype end group for non-group") 609 } 610 if fieldNum <= 0 { 611 return fmt.Errorf("proto: RequestBroadcastTx: illegal tag %d (wire type %d)", fieldNum, wire) 612 } 613 switch fieldNum { 614 case 1: 615 if wireType != 2 { 616 return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) 617 } 618 var byteLen int 619 for shift := uint(0); ; shift += 7 { 620 if shift >= 64 { 621 return ErrIntOverflowTypes 622 } 623 if iNdEx >= l { 624 return io.ErrUnexpectedEOF 625 } 626 b := dAtA[iNdEx] 627 iNdEx++ 628 byteLen |= int(b&0x7F) << shift 629 if b < 0x80 { 630 break 631 } 632 } 633 if byteLen < 0 { 634 return ErrInvalidLengthTypes 635 } 636 postIndex := iNdEx + byteLen 637 if postIndex < 0 { 638 return ErrInvalidLengthTypes 639 } 640 if postIndex > l { 641 return io.ErrUnexpectedEOF 642 } 643 m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...) 644 if m.Tx == nil { 645 m.Tx = []byte{} 646 } 647 iNdEx = postIndex 648 default: 649 iNdEx = preIndex 650 skippy, err := skipTypes(dAtA[iNdEx:]) 651 if err != nil { 652 return err 653 } 654 if (skippy < 0) || (iNdEx+skippy) < 0 { 655 return ErrInvalidLengthTypes 656 } 657 if (iNdEx + skippy) > l { 658 return io.ErrUnexpectedEOF 659 } 660 iNdEx += skippy 661 } 662 } 663 664 if iNdEx > l { 665 return io.ErrUnexpectedEOF 666 } 667 return nil 668 } 669 func (m *ResponsePing) Unmarshal(dAtA []byte) error { 670 l := len(dAtA) 671 iNdEx := 0 672 for iNdEx < l { 673 preIndex := iNdEx 674 var wire uint64 675 for shift := uint(0); ; shift += 7 { 676 if shift >= 64 { 677 return ErrIntOverflowTypes 678 } 679 if iNdEx >= l { 680 return io.ErrUnexpectedEOF 681 } 682 b := dAtA[iNdEx] 683 iNdEx++ 684 wire |= uint64(b&0x7F) << shift 685 if b < 0x80 { 686 break 687 } 688 } 689 fieldNum := int32(wire >> 3) 690 wireType := int(wire & 0x7) 691 if wireType == 4 { 692 return fmt.Errorf("proto: ResponsePing: wiretype end group for non-group") 693 } 694 if fieldNum <= 0 { 695 return fmt.Errorf("proto: ResponsePing: illegal tag %d (wire type %d)", fieldNum, wire) 696 } 697 switch fieldNum { 698 default: 699 iNdEx = preIndex 700 skippy, err := skipTypes(dAtA[iNdEx:]) 701 if err != nil { 702 return err 703 } 704 if (skippy < 0) || (iNdEx+skippy) < 0 { 705 return ErrInvalidLengthTypes 706 } 707 if (iNdEx + skippy) > l { 708 return io.ErrUnexpectedEOF 709 } 710 iNdEx += skippy 711 } 712 } 713 714 if iNdEx > l { 715 return io.ErrUnexpectedEOF 716 } 717 return nil 718 } 719 func (m *ResponseBroadcastTx) Unmarshal(dAtA []byte) error { 720 l := len(dAtA) 721 iNdEx := 0 722 for iNdEx < l { 723 preIndex := iNdEx 724 var wire uint64 725 for shift := uint(0); ; shift += 7 { 726 if shift >= 64 { 727 return ErrIntOverflowTypes 728 } 729 if iNdEx >= l { 730 return io.ErrUnexpectedEOF 731 } 732 b := dAtA[iNdEx] 733 iNdEx++ 734 wire |= uint64(b&0x7F) << shift 735 if b < 0x80 { 736 break 737 } 738 } 739 fieldNum := int32(wire >> 3) 740 wireType := int(wire & 0x7) 741 if wireType == 4 { 742 return fmt.Errorf("proto: ResponseBroadcastTx: wiretype end group for non-group") 743 } 744 if fieldNum <= 0 { 745 return fmt.Errorf("proto: ResponseBroadcastTx: illegal tag %d (wire type %d)", fieldNum, wire) 746 } 747 switch fieldNum { 748 case 1: 749 if wireType != 2 { 750 return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType) 751 } 752 var msglen int 753 for shift := uint(0); ; shift += 7 { 754 if shift >= 64 { 755 return ErrIntOverflowTypes 756 } 757 if iNdEx >= l { 758 return io.ErrUnexpectedEOF 759 } 760 b := dAtA[iNdEx] 761 iNdEx++ 762 msglen |= int(b&0x7F) << shift 763 if b < 0x80 { 764 break 765 } 766 } 767 if msglen < 0 { 768 return ErrInvalidLengthTypes 769 } 770 postIndex := iNdEx + msglen 771 if postIndex < 0 { 772 return ErrInvalidLengthTypes 773 } 774 if postIndex > l { 775 return io.ErrUnexpectedEOF 776 } 777 if m.CheckTx == nil { 778 m.CheckTx = &types.ResponseCheckTx{} 779 } 780 if err := m.CheckTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 781 return err 782 } 783 iNdEx = postIndex 784 case 2: 785 if wireType != 2 { 786 return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType) 787 } 788 var msglen int 789 for shift := uint(0); ; shift += 7 { 790 if shift >= 64 { 791 return ErrIntOverflowTypes 792 } 793 if iNdEx >= l { 794 return io.ErrUnexpectedEOF 795 } 796 b := dAtA[iNdEx] 797 iNdEx++ 798 msglen |= int(b&0x7F) << shift 799 if b < 0x80 { 800 break 801 } 802 } 803 if msglen < 0 { 804 return ErrInvalidLengthTypes 805 } 806 postIndex := iNdEx + msglen 807 if postIndex < 0 { 808 return ErrInvalidLengthTypes 809 } 810 if postIndex > l { 811 return io.ErrUnexpectedEOF 812 } 813 if m.DeliverTx == nil { 814 m.DeliverTx = &types.ResponseDeliverTx{} 815 } 816 if err := m.DeliverTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 817 return err 818 } 819 iNdEx = postIndex 820 default: 821 iNdEx = preIndex 822 skippy, err := skipTypes(dAtA[iNdEx:]) 823 if err != nil { 824 return err 825 } 826 if (skippy < 0) || (iNdEx+skippy) < 0 { 827 return ErrInvalidLengthTypes 828 } 829 if (iNdEx + skippy) > l { 830 return io.ErrUnexpectedEOF 831 } 832 iNdEx += skippy 833 } 834 } 835 836 if iNdEx > l { 837 return io.ErrUnexpectedEOF 838 } 839 return nil 840 } 841 func skipTypes(dAtA []byte) (n int, err error) { 842 l := len(dAtA) 843 iNdEx := 0 844 depth := 0 845 for iNdEx < l { 846 var wire uint64 847 for shift := uint(0); ; shift += 7 { 848 if shift >= 64 { 849 return 0, ErrIntOverflowTypes 850 } 851 if iNdEx >= l { 852 return 0, io.ErrUnexpectedEOF 853 } 854 b := dAtA[iNdEx] 855 iNdEx++ 856 wire |= (uint64(b) & 0x7F) << shift 857 if b < 0x80 { 858 break 859 } 860 } 861 wireType := int(wire & 0x7) 862 switch wireType { 863 case 0: 864 for shift := uint(0); ; shift += 7 { 865 if shift >= 64 { 866 return 0, ErrIntOverflowTypes 867 } 868 if iNdEx >= l { 869 return 0, io.ErrUnexpectedEOF 870 } 871 iNdEx++ 872 if dAtA[iNdEx-1] < 0x80 { 873 break 874 } 875 } 876 case 1: 877 iNdEx += 8 878 case 2: 879 var length int 880 for shift := uint(0); ; shift += 7 { 881 if shift >= 64 { 882 return 0, ErrIntOverflowTypes 883 } 884 if iNdEx >= l { 885 return 0, io.ErrUnexpectedEOF 886 } 887 b := dAtA[iNdEx] 888 iNdEx++ 889 length |= (int(b) & 0x7F) << shift 890 if b < 0x80 { 891 break 892 } 893 } 894 if length < 0 { 895 return 0, ErrInvalidLengthTypes 896 } 897 iNdEx += length 898 case 3: 899 depth++ 900 case 4: 901 if depth == 0 { 902 return 0, ErrUnexpectedEndOfGroupTypes 903 } 904 depth-- 905 case 5: 906 iNdEx += 4 907 default: 908 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 909 } 910 if iNdEx < 0 { 911 return 0, ErrInvalidLengthTypes 912 } 913 if depth == 0 { 914 return iNdEx, nil 915 } 916 } 917 return 0, io.ErrUnexpectedEOF 918 } 919 920 var ( 921 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 922 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 923 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 924 )