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