github.com/okex/exchain@v1.8.0/libs/tendermint/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 coregrpc 5 6 import ( 7 bytes "bytes" 8 context "context" 9 fmt "fmt" 10 _ "github.com/gogo/protobuf/gogoproto" 11 proto "github.com/gogo/protobuf/proto" 12 golang_proto "github.com/golang/protobuf/proto" 13 types "github.com/okex/exchain/libs/tendermint/abci/types" 14 grpc "google.golang.org/grpc" 15 codes "google.golang.org/grpc/codes" 16 status "google.golang.org/grpc/status" 17 io "io" 18 math "math" 19 math_bits "math/bits" 20 ) 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.GoGoProtoPackageIsVersion3 // 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_15f63baabf91876a, []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.MarshalToSizedBuffer(b) 55 if err != nil { 56 return nil, err 57 } 58 return b[:n], nil 59 } 60 } 61 func (m *RequestPing) XXX_Merge(src proto.Message) { 62 xxx_messageInfo_RequestPing.Merge(m, 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_15f63baabf91876a, []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.MarshalToSizedBuffer(b) 95 if err != nil { 96 return nil, err 97 } 98 return b[:n], nil 99 } 100 } 101 func (m *RequestBroadcastTx) XXX_Merge(src proto.Message) { 102 xxx_messageInfo_RequestBroadcastTx.Merge(m, 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_15f63baabf91876a, []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.MarshalToSizedBuffer(b) 141 if err != nil { 142 return nil, err 143 } 144 return b[:n], nil 145 } 146 } 147 func (m *ResponsePing) XXX_Merge(src proto.Message) { 148 xxx_messageInfo_ResponsePing.Merge(m, 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,proto3" json:"check_tx,omitempty"` 161 DeliverTx *types.ResponseDeliverTx `protobuf:"bytes,2,opt,name=deliver_tx,json=deliverTx,proto3" 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_15f63baabf91876a, []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.MarshalToSizedBuffer(b) 182 if err != nil { 183 return nil, err 184 } 185 return b[:n], nil 186 } 187 } 188 func (m *ResponseBroadcastTx) XXX_Merge(src proto.Message) { 189 xxx_messageInfo_ResponseBroadcastTx.Merge(m, 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), "tendermint.rpc.grpc.RequestPing") 216 golang_proto.RegisterType((*RequestPing)(nil), "tendermint.rpc.grpc.RequestPing") 217 proto.RegisterType((*RequestBroadcastTx)(nil), "tendermint.rpc.grpc.RequestBroadcastTx") 218 golang_proto.RegisterType((*RequestBroadcastTx)(nil), "tendermint.rpc.grpc.RequestBroadcastTx") 219 proto.RegisterType((*ResponsePing)(nil), "tendermint.rpc.grpc.ResponsePing") 220 golang_proto.RegisterType((*ResponsePing)(nil), "tendermint.rpc.grpc.ResponsePing") 221 proto.RegisterType((*ResponseBroadcastTx)(nil), "tendermint.rpc.grpc.ResponseBroadcastTx") 222 golang_proto.RegisterType((*ResponseBroadcastTx)(nil), "tendermint.rpc.grpc.ResponseBroadcastTx") 223 } 224 225 func init() { proto.RegisterFile("rpc/grpc/types.proto", fileDescriptor_15f63baabf91876a) } 226 func init() { golang_proto.RegisterFile("rpc/grpc/types.proto", fileDescriptor_15f63baabf91876a) } 227 228 var fileDescriptor_15f63baabf91876a = []byte{ 229 // 344 bytes of a gzipped FileDescriptorProto 230 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xb1, 0x4e, 0xf3, 0x30, 231 0x14, 0x85, 0xe5, 0xea, 0xd7, 0x0f, 0xdc, 0x96, 0x0e, 0x2e, 0x42, 0x28, 0x83, 0x55, 0x2a, 0x54, 232 0x3a, 0x39, 0x52, 0x19, 0x99, 0x5a, 0x90, 0x10, 0x62, 0xa9, 0xa2, 0x4e, 0x2c, 0x25, 0x75, 0xac, 233 0x34, 0x82, 0xc6, 0xc6, 0x71, 0x51, 0xfa, 0x38, 0x6c, 0x3c, 0x02, 0x0b, 0x12, 0x23, 0x23, 0x8f, 234 0x00, 0xe1, 0x25, 0x18, 0x91, 0x93, 0x86, 0x78, 0x80, 0xb2, 0x44, 0x27, 0xd6, 0x39, 0x9f, 0xce, 235 0xbd, 0xba, 0xb0, 0xa3, 0x24, 0x73, 0x43, 0xf3, 0xd1, 0x4b, 0xc9, 0x13, 0x2a, 0x95, 0xd0, 0x02, 236 0xb7, 0x34, 0x8f, 0x03, 0xae, 0xe6, 0x51, 0xac, 0xa9, 0x92, 0x8c, 0x1a, 0x83, 0xd3, 0xd5, 0xb3, 237 0x48, 0x05, 0x13, 0xe9, 0x2b, 0xbd, 0x74, 0x73, 0x9f, 0x1b, 0x8a, 0x50, 0x54, 0xaa, 0x08, 0x3b, 238 0xbb, 0xfe, 0x94, 0x45, 0x05, 0xce, 0x86, 0x76, 0xb6, 0xa1, 0xee, 0xf1, 0xdb, 0x05, 0x4f, 0xf4, 239 0x28, 0x8a, 0xc3, 0xce, 0x01, 0xe0, 0xd5, 0xef, 0x50, 0x09, 0x3f, 0x60, 0x7e, 0xa2, 0xc7, 0x29, 240 0x6e, 0x42, 0x4d, 0xa7, 0x7b, 0xa8, 0x8d, 0x7a, 0x0d, 0xaf, 0xa6, 0xd3, 0x4e, 0x13, 0x1a, 0x1e, 241 0x4f, 0xa4, 0x88, 0x13, 0x9e, 0xa7, 0xee, 0x11, 0xb4, 0xca, 0x07, 0x3b, 0x37, 0x80, 0x4d, 0x36, 242 0xe3, 0xec, 0x7a, 0xb2, 0x4a, 0xd7, 0xfb, 0x5d, 0x6a, 0x0d, 0x61, 0x2a, 0xd1, 0xa2, 0x4c, 0x99, 243 0x3e, 0x31, 0xf6, 0x71, 0xea, 0x6d, 0xb0, 0x42, 0xe0, 0x33, 0x80, 0x80, 0xdf, 0x44, 0x77, 0x5c, 244 0x19, 0x48, 0x2d, 0x87, 0xf4, 0xfe, 0x80, 0x9c, 0x16, 0x81, 0x71, 0xea, 0x6d, 0x05, 0xa5, 0xec, 245 0x3f, 0x21, 0x68, 0x7c, 0x77, 0x1b, 0x8c, 0xce, 0xf1, 0x05, 0xfc, 0x33, 0xe5, 0x71, 0x9b, 0xfe, 246 0xb0, 0x57, 0x6a, 0x2d, 0xc5, 0xd9, 0xff, 0xc5, 0x51, 0x6d, 0x00, 0x5f, 0x41, 0xdd, 0x1e, 0xfc, 247 0x70, 0x1d, 0xd3, 0x32, 0x3a, 0xbd, 0xb5, 0x68, 0xcb, 0x39, 0x1c, 0x7d, 0xbe, 0x13, 0xf4, 0x90, 248 0x11, 0xf4, 0x98, 0x11, 0xf4, 0x92, 0x11, 0xf4, 0x9a, 0x11, 0xf4, 0x96, 0x11, 0xf4, 0xfc, 0x41, 249 0xd0, 0x65, 0x3f, 0x8c, 0xf4, 0x6c, 0x31, 0xa5, 0x4c, 0xcc, 0xdd, 0x8a, 0x68, 0xcb, 0xf2, 0xa4, 250 0x8e, 0x99, 0x50, 0xdc, 0x88, 0xe9, 0xff, 0xfc, 0x02, 0x8e, 0xbe, 0x02, 0x00, 0x00, 0xff, 0xff, 251 0x30, 0xfd, 0xaa, 0xac, 0x6e, 0x02, 0x00, 0x00, 252 } 253 254 func (this *RequestPing) Equal(that interface{}) bool { 255 if that == nil { 256 return this == nil 257 } 258 259 that1, ok := that.(*RequestPing) 260 if !ok { 261 that2, ok := that.(RequestPing) 262 if ok { 263 that1 = &that2 264 } else { 265 return false 266 } 267 } 268 if that1 == nil { 269 return this == nil 270 } else if this == nil { 271 return false 272 } 273 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { 274 return false 275 } 276 return true 277 } 278 func (this *RequestBroadcastTx) Equal(that interface{}) bool { 279 if that == nil { 280 return this == nil 281 } 282 283 that1, ok := that.(*RequestBroadcastTx) 284 if !ok { 285 that2, ok := that.(RequestBroadcastTx) 286 if ok { 287 that1 = &that2 288 } else { 289 return false 290 } 291 } 292 if that1 == nil { 293 return this == nil 294 } else if this == nil { 295 return false 296 } 297 if !bytes.Equal(this.Tx, that1.Tx) { 298 return false 299 } 300 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { 301 return false 302 } 303 return true 304 } 305 func (this *ResponsePing) Equal(that interface{}) bool { 306 if that == nil { 307 return this == nil 308 } 309 310 that1, ok := that.(*ResponsePing) 311 if !ok { 312 that2, ok := that.(ResponsePing) 313 if ok { 314 that1 = &that2 315 } else { 316 return false 317 } 318 } 319 if that1 == nil { 320 return this == nil 321 } else if this == nil { 322 return false 323 } 324 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { 325 return false 326 } 327 return true 328 } 329 func (this *ResponseBroadcastTx) Equal(that interface{}) bool { 330 if that == nil { 331 return this == nil 332 } 333 334 that1, ok := that.(*ResponseBroadcastTx) 335 if !ok { 336 that2, ok := that.(ResponseBroadcastTx) 337 if ok { 338 that1 = &that2 339 } else { 340 return false 341 } 342 } 343 if that1 == nil { 344 return this == nil 345 } else if this == nil { 346 return false 347 } 348 if !this.CheckTx.Equal(that1.CheckTx) { 349 return false 350 } 351 if !this.DeliverTx.Equal(that1.DeliverTx) { 352 return false 353 } 354 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { 355 return false 356 } 357 return true 358 } 359 360 // Reference imports to suppress errors if they are not otherwise used. 361 var _ context.Context 362 var _ grpc.ClientConn 363 364 // This is a compile-time assertion to ensure that this generated file 365 // is compatible with the grpc package it is being compiled against. 366 const _ = grpc.SupportPackageIsVersion4 367 368 // BroadcastAPIClient is the client API for BroadcastAPI service. 369 // 370 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 371 type BroadcastAPIClient interface { 372 Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error) 373 BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error) 374 } 375 376 type broadcastAPIClient struct { 377 cc *grpc.ClientConn 378 } 379 380 func NewBroadcastAPIClient(cc *grpc.ClientConn) BroadcastAPIClient { 381 return &broadcastAPIClient{cc} 382 } 383 384 func (c *broadcastAPIClient) Ping(ctx context.Context, in *RequestPing, opts ...grpc.CallOption) (*ResponsePing, error) { 385 out := new(ResponsePing) 386 err := c.cc.Invoke(ctx, "/tendermint.rpc.grpc.BroadcastAPI/Ping", in, out, opts...) 387 if err != nil { 388 return nil, err 389 } 390 return out, nil 391 } 392 393 func (c *broadcastAPIClient) BroadcastTx(ctx context.Context, in *RequestBroadcastTx, opts ...grpc.CallOption) (*ResponseBroadcastTx, error) { 394 out := new(ResponseBroadcastTx) 395 err := c.cc.Invoke(ctx, "/tendermint.rpc.grpc.BroadcastAPI/BroadcastTx", in, out, opts...) 396 if err != nil { 397 return nil, err 398 } 399 return out, nil 400 } 401 402 // BroadcastAPIServer is the server API for BroadcastAPI service. 403 type BroadcastAPIServer interface { 404 Ping(context.Context, *RequestPing) (*ResponsePing, error) 405 BroadcastTx(context.Context, *RequestBroadcastTx) (*ResponseBroadcastTx, error) 406 } 407 408 // UnimplementedBroadcastAPIServer can be embedded to have forward compatible implementations. 409 type UnimplementedBroadcastAPIServer struct { 410 } 411 412 func (*UnimplementedBroadcastAPIServer) Ping(ctx context.Context, req *RequestPing) (*ResponsePing, error) { 413 return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") 414 } 415 func (*UnimplementedBroadcastAPIServer) BroadcastTx(ctx context.Context, req *RequestBroadcastTx) (*ResponseBroadcastTx, error) { 416 return nil, status.Errorf(codes.Unimplemented, "method BroadcastTx not implemented") 417 } 418 419 func RegisterBroadcastAPIServer(s *grpc.Server, srv BroadcastAPIServer) { 420 s.RegisterService(&_BroadcastAPI_serviceDesc, srv) 421 } 422 423 func _BroadcastAPI_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 424 in := new(RequestPing) 425 if err := dec(in); err != nil { 426 return nil, err 427 } 428 if interceptor == nil { 429 return srv.(BroadcastAPIServer).Ping(ctx, in) 430 } 431 info := &grpc.UnaryServerInfo{ 432 Server: srv, 433 FullMethod: "/tendermint.rpc.grpc.BroadcastAPI/Ping", 434 } 435 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 436 return srv.(BroadcastAPIServer).Ping(ctx, req.(*RequestPing)) 437 } 438 return interceptor(ctx, in, info, handler) 439 } 440 441 func _BroadcastAPI_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 442 in := new(RequestBroadcastTx) 443 if err := dec(in); err != nil { 444 return nil, err 445 } 446 if interceptor == nil { 447 return srv.(BroadcastAPIServer).BroadcastTx(ctx, in) 448 } 449 info := &grpc.UnaryServerInfo{ 450 Server: srv, 451 FullMethod: "/tendermint.rpc.grpc.BroadcastAPI/BroadcastTx", 452 } 453 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 454 return srv.(BroadcastAPIServer).BroadcastTx(ctx, req.(*RequestBroadcastTx)) 455 } 456 return interceptor(ctx, in, info, handler) 457 } 458 459 var _BroadcastAPI_serviceDesc = grpc.ServiceDesc{ 460 ServiceName: "tendermint.rpc.grpc.BroadcastAPI", 461 HandlerType: (*BroadcastAPIServer)(nil), 462 Methods: []grpc.MethodDesc{ 463 { 464 MethodName: "Ping", 465 Handler: _BroadcastAPI_Ping_Handler, 466 }, 467 { 468 MethodName: "BroadcastTx", 469 Handler: _BroadcastAPI_BroadcastTx_Handler, 470 }, 471 }, 472 Streams: []grpc.StreamDesc{}, 473 Metadata: "rpc/grpc/types.proto", 474 } 475 476 func (m *RequestPing) Marshal() (dAtA []byte, err error) { 477 size := m.Size() 478 dAtA = make([]byte, size) 479 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 480 if err != nil { 481 return nil, err 482 } 483 return dAtA[:n], nil 484 } 485 486 func (m *RequestPing) MarshalTo(dAtA []byte) (int, error) { 487 size := m.Size() 488 return m.MarshalToSizedBuffer(dAtA[:size]) 489 } 490 491 func (m *RequestPing) MarshalToSizedBuffer(dAtA []byte) (int, error) { 492 i := len(dAtA) 493 _ = i 494 var l int 495 _ = l 496 if m.XXX_unrecognized != nil { 497 i -= len(m.XXX_unrecognized) 498 copy(dAtA[i:], m.XXX_unrecognized) 499 } 500 return len(dAtA) - i, nil 501 } 502 503 func (m *RequestBroadcastTx) Marshal() (dAtA []byte, err error) { 504 size := m.Size() 505 dAtA = make([]byte, size) 506 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 507 if err != nil { 508 return nil, err 509 } 510 return dAtA[:n], nil 511 } 512 513 func (m *RequestBroadcastTx) MarshalTo(dAtA []byte) (int, error) { 514 size := m.Size() 515 return m.MarshalToSizedBuffer(dAtA[:size]) 516 } 517 518 func (m *RequestBroadcastTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { 519 i := len(dAtA) 520 _ = i 521 var l int 522 _ = l 523 if m.XXX_unrecognized != nil { 524 i -= len(m.XXX_unrecognized) 525 copy(dAtA[i:], m.XXX_unrecognized) 526 } 527 if len(m.Tx) > 0 { 528 i -= len(m.Tx) 529 copy(dAtA[i:], m.Tx) 530 i = encodeVarintTypes(dAtA, i, uint64(len(m.Tx))) 531 i-- 532 dAtA[i] = 0xa 533 } 534 return len(dAtA) - i, nil 535 } 536 537 func (m *ResponsePing) Marshal() (dAtA []byte, err error) { 538 size := m.Size() 539 dAtA = make([]byte, size) 540 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 541 if err != nil { 542 return nil, err 543 } 544 return dAtA[:n], nil 545 } 546 547 func (m *ResponsePing) MarshalTo(dAtA []byte) (int, error) { 548 size := m.Size() 549 return m.MarshalToSizedBuffer(dAtA[:size]) 550 } 551 552 func (m *ResponsePing) MarshalToSizedBuffer(dAtA []byte) (int, error) { 553 i := len(dAtA) 554 _ = i 555 var l int 556 _ = l 557 if m.XXX_unrecognized != nil { 558 i -= len(m.XXX_unrecognized) 559 copy(dAtA[i:], m.XXX_unrecognized) 560 } 561 return len(dAtA) - i, nil 562 } 563 564 func (m *ResponseBroadcastTx) Marshal() (dAtA []byte, err error) { 565 size := m.Size() 566 dAtA = make([]byte, size) 567 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 568 if err != nil { 569 return nil, err 570 } 571 return dAtA[:n], nil 572 } 573 574 func (m *ResponseBroadcastTx) MarshalTo(dAtA []byte) (int, error) { 575 size := m.Size() 576 return m.MarshalToSizedBuffer(dAtA[:size]) 577 } 578 579 func (m *ResponseBroadcastTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { 580 i := len(dAtA) 581 _ = i 582 var l int 583 _ = l 584 if m.XXX_unrecognized != nil { 585 i -= len(m.XXX_unrecognized) 586 copy(dAtA[i:], m.XXX_unrecognized) 587 } 588 if m.DeliverTx != nil { 589 { 590 size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i]) 591 if err != nil { 592 return 0, err 593 } 594 i -= size 595 i = encodeVarintTypes(dAtA, i, uint64(size)) 596 } 597 i-- 598 dAtA[i] = 0x12 599 } 600 if m.CheckTx != nil { 601 { 602 size, err := m.CheckTx.MarshalToSizedBuffer(dAtA[:i]) 603 if err != nil { 604 return 0, err 605 } 606 i -= size 607 i = encodeVarintTypes(dAtA, i, uint64(size)) 608 } 609 i-- 610 dAtA[i] = 0xa 611 } 612 return len(dAtA) - i, nil 613 } 614 615 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 616 offset -= sovTypes(v) 617 base := offset 618 for v >= 1<<7 { 619 dAtA[offset] = uint8(v&0x7f | 0x80) 620 v >>= 7 621 offset++ 622 } 623 dAtA[offset] = uint8(v) 624 return base 625 } 626 func NewPopulatedRequestPing(r randyTypes, easy bool) *RequestPing { 627 this := &RequestPing{} 628 if !easy && r.Intn(10) != 0 { 629 this.XXX_unrecognized = randUnrecognizedTypes(r, 1) 630 } 631 return this 632 } 633 634 func NewPopulatedRequestBroadcastTx(r randyTypes, easy bool) *RequestBroadcastTx { 635 this := &RequestBroadcastTx{} 636 v1 := r.Intn(100) 637 this.Tx = make([]byte, v1) 638 for i := 0; i < v1; i++ { 639 this.Tx[i] = byte(r.Intn(256)) 640 } 641 if !easy && r.Intn(10) != 0 { 642 this.XXX_unrecognized = randUnrecognizedTypes(r, 2) 643 } 644 return this 645 } 646 647 func NewPopulatedResponsePing(r randyTypes, easy bool) *ResponsePing { 648 this := &ResponsePing{} 649 if !easy && r.Intn(10) != 0 { 650 this.XXX_unrecognized = randUnrecognizedTypes(r, 1) 651 } 652 return this 653 } 654 655 func NewPopulatedResponseBroadcastTx(r randyTypes, easy bool) *ResponseBroadcastTx { 656 this := &ResponseBroadcastTx{} 657 if r.Intn(5) != 0 { 658 this.CheckTx = types.NewPopulatedResponseCheckTx(r, easy) 659 } 660 if r.Intn(5) != 0 { 661 this.DeliverTx = types.NewPopulatedResponseDeliverTx(r, easy) 662 } 663 if !easy && r.Intn(10) != 0 { 664 this.XXX_unrecognized = randUnrecognizedTypes(r, 3) 665 } 666 return this 667 } 668 669 type randyTypes interface { 670 Float32() float32 671 Float64() float64 672 Int63() int64 673 Int31() int32 674 Uint32() uint32 675 Intn(n int) int 676 } 677 678 func randUTF8RuneTypes(r randyTypes) rune { 679 ru := r.Intn(62) 680 if ru < 10 { 681 return rune(ru + 48) 682 } else if ru < 36 { 683 return rune(ru + 55) 684 } 685 return rune(ru + 61) 686 } 687 func randStringTypes(r randyTypes) string { 688 v2 := r.Intn(100) 689 tmps := make([]rune, v2) 690 for i := 0; i < v2; i++ { 691 tmps[i] = randUTF8RuneTypes(r) 692 } 693 return string(tmps) 694 } 695 func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { 696 l := r.Intn(5) 697 for i := 0; i < l; i++ { 698 wire := r.Intn(4) 699 if wire == 3 { 700 wire = 5 701 } 702 fieldNumber := maxFieldNumber + r.Intn(100) 703 dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) 704 } 705 return dAtA 706 } 707 func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { 708 key := uint32(fieldNumber)<<3 | uint32(wire) 709 switch wire { 710 case 0: 711 dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) 712 v3 := r.Int63() 713 if r.Intn(2) == 0 { 714 v3 *= -1 715 } 716 dAtA = encodeVarintPopulateTypes(dAtA, uint64(v3)) 717 case 1: 718 dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) 719 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))) 720 case 2: 721 dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) 722 ll := r.Intn(100) 723 dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) 724 for j := 0; j < ll; j++ { 725 dAtA = append(dAtA, byte(r.Intn(256))) 726 } 727 default: 728 dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) 729 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 730 } 731 return dAtA 732 } 733 func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { 734 for v >= 1<<7 { 735 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) 736 v >>= 7 737 } 738 dAtA = append(dAtA, uint8(v)) 739 return dAtA 740 } 741 func (m *RequestPing) Size() (n int) { 742 if m == nil { 743 return 0 744 } 745 var l int 746 _ = l 747 if m.XXX_unrecognized != nil { 748 n += len(m.XXX_unrecognized) 749 } 750 return n 751 } 752 753 func (m *RequestBroadcastTx) Size() (n int) { 754 if m == nil { 755 return 0 756 } 757 var l int 758 _ = l 759 l = len(m.Tx) 760 if l > 0 { 761 n += 1 + l + sovTypes(uint64(l)) 762 } 763 if m.XXX_unrecognized != nil { 764 n += len(m.XXX_unrecognized) 765 } 766 return n 767 } 768 769 func (m *ResponsePing) Size() (n int) { 770 if m == nil { 771 return 0 772 } 773 var l int 774 _ = l 775 if m.XXX_unrecognized != nil { 776 n += len(m.XXX_unrecognized) 777 } 778 return n 779 } 780 781 func (m *ResponseBroadcastTx) Size() (n int) { 782 if m == nil { 783 return 0 784 } 785 var l int 786 _ = l 787 if m.CheckTx != nil { 788 l = m.CheckTx.Size() 789 n += 1 + l + sovTypes(uint64(l)) 790 } 791 if m.DeliverTx != nil { 792 l = m.DeliverTx.Size() 793 n += 1 + l + sovTypes(uint64(l)) 794 } 795 if m.XXX_unrecognized != nil { 796 n += len(m.XXX_unrecognized) 797 } 798 return n 799 } 800 801 func sovTypes(x uint64) (n int) { 802 return (math_bits.Len64(x|1) + 6) / 7 803 } 804 func sozTypes(x uint64) (n int) { 805 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 806 } 807 func (m *RequestPing) Unmarshal(dAtA []byte) error { 808 l := len(dAtA) 809 iNdEx := 0 810 for iNdEx < l { 811 preIndex := iNdEx 812 var wire uint64 813 for shift := uint(0); ; shift += 7 { 814 if shift >= 64 { 815 return ErrIntOverflowTypes 816 } 817 if iNdEx >= l { 818 return io.ErrUnexpectedEOF 819 } 820 b := dAtA[iNdEx] 821 iNdEx++ 822 wire |= uint64(b&0x7F) << shift 823 if b < 0x80 { 824 break 825 } 826 } 827 fieldNum := int32(wire >> 3) 828 wireType := int(wire & 0x7) 829 if wireType == 4 { 830 return fmt.Errorf("proto: RequestPing: wiretype end group for non-group") 831 } 832 if fieldNum <= 0 { 833 return fmt.Errorf("proto: RequestPing: illegal tag %d (wire type %d)", fieldNum, wire) 834 } 835 switch fieldNum { 836 default: 837 iNdEx = preIndex 838 skippy, err := skipTypes(dAtA[iNdEx:]) 839 if err != nil { 840 return err 841 } 842 if skippy < 0 { 843 return ErrInvalidLengthTypes 844 } 845 if (iNdEx + skippy) < 0 { 846 return ErrInvalidLengthTypes 847 } 848 if (iNdEx + skippy) > l { 849 return io.ErrUnexpectedEOF 850 } 851 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 852 iNdEx += skippy 853 } 854 } 855 856 if iNdEx > l { 857 return io.ErrUnexpectedEOF 858 } 859 return nil 860 } 861 func (m *RequestBroadcastTx) Unmarshal(dAtA []byte) error { 862 l := len(dAtA) 863 iNdEx := 0 864 for iNdEx < l { 865 preIndex := iNdEx 866 var wire uint64 867 for shift := uint(0); ; shift += 7 { 868 if shift >= 64 { 869 return ErrIntOverflowTypes 870 } 871 if iNdEx >= l { 872 return io.ErrUnexpectedEOF 873 } 874 b := dAtA[iNdEx] 875 iNdEx++ 876 wire |= uint64(b&0x7F) << shift 877 if b < 0x80 { 878 break 879 } 880 } 881 fieldNum := int32(wire >> 3) 882 wireType := int(wire & 0x7) 883 if wireType == 4 { 884 return fmt.Errorf("proto: RequestBroadcastTx: wiretype end group for non-group") 885 } 886 if fieldNum <= 0 { 887 return fmt.Errorf("proto: RequestBroadcastTx: illegal tag %d (wire type %d)", fieldNum, wire) 888 } 889 switch fieldNum { 890 case 1: 891 if wireType != 2 { 892 return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) 893 } 894 var byteLen int 895 for shift := uint(0); ; shift += 7 { 896 if shift >= 64 { 897 return ErrIntOverflowTypes 898 } 899 if iNdEx >= l { 900 return io.ErrUnexpectedEOF 901 } 902 b := dAtA[iNdEx] 903 iNdEx++ 904 byteLen |= int(b&0x7F) << shift 905 if b < 0x80 { 906 break 907 } 908 } 909 if byteLen < 0 { 910 return ErrInvalidLengthTypes 911 } 912 postIndex := iNdEx + byteLen 913 if postIndex < 0 { 914 return ErrInvalidLengthTypes 915 } 916 if postIndex > l { 917 return io.ErrUnexpectedEOF 918 } 919 m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...) 920 if m.Tx == nil { 921 m.Tx = []byte{} 922 } 923 iNdEx = postIndex 924 default: 925 iNdEx = preIndex 926 skippy, err := skipTypes(dAtA[iNdEx:]) 927 if err != nil { 928 return err 929 } 930 if skippy < 0 { 931 return ErrInvalidLengthTypes 932 } 933 if (iNdEx + skippy) < 0 { 934 return ErrInvalidLengthTypes 935 } 936 if (iNdEx + skippy) > l { 937 return io.ErrUnexpectedEOF 938 } 939 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 940 iNdEx += skippy 941 } 942 } 943 944 if iNdEx > l { 945 return io.ErrUnexpectedEOF 946 } 947 return nil 948 } 949 func (m *ResponsePing) Unmarshal(dAtA []byte) error { 950 l := len(dAtA) 951 iNdEx := 0 952 for iNdEx < l { 953 preIndex := iNdEx 954 var wire uint64 955 for shift := uint(0); ; shift += 7 { 956 if shift >= 64 { 957 return ErrIntOverflowTypes 958 } 959 if iNdEx >= l { 960 return io.ErrUnexpectedEOF 961 } 962 b := dAtA[iNdEx] 963 iNdEx++ 964 wire |= uint64(b&0x7F) << shift 965 if b < 0x80 { 966 break 967 } 968 } 969 fieldNum := int32(wire >> 3) 970 wireType := int(wire & 0x7) 971 if wireType == 4 { 972 return fmt.Errorf("proto: ResponsePing: wiretype end group for non-group") 973 } 974 if fieldNum <= 0 { 975 return fmt.Errorf("proto: ResponsePing: illegal tag %d (wire type %d)", fieldNum, wire) 976 } 977 switch fieldNum { 978 default: 979 iNdEx = preIndex 980 skippy, err := skipTypes(dAtA[iNdEx:]) 981 if err != nil { 982 return err 983 } 984 if skippy < 0 { 985 return ErrInvalidLengthTypes 986 } 987 if (iNdEx + skippy) < 0 { 988 return ErrInvalidLengthTypes 989 } 990 if (iNdEx + skippy) > l { 991 return io.ErrUnexpectedEOF 992 } 993 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 994 iNdEx += skippy 995 } 996 } 997 998 if iNdEx > l { 999 return io.ErrUnexpectedEOF 1000 } 1001 return nil 1002 } 1003 func (m *ResponseBroadcastTx) Unmarshal(dAtA []byte) error { 1004 l := len(dAtA) 1005 iNdEx := 0 1006 for iNdEx < l { 1007 preIndex := iNdEx 1008 var wire uint64 1009 for shift := uint(0); ; shift += 7 { 1010 if shift >= 64 { 1011 return ErrIntOverflowTypes 1012 } 1013 if iNdEx >= l { 1014 return io.ErrUnexpectedEOF 1015 } 1016 b := dAtA[iNdEx] 1017 iNdEx++ 1018 wire |= uint64(b&0x7F) << shift 1019 if b < 0x80 { 1020 break 1021 } 1022 } 1023 fieldNum := int32(wire >> 3) 1024 wireType := int(wire & 0x7) 1025 if wireType == 4 { 1026 return fmt.Errorf("proto: ResponseBroadcastTx: wiretype end group for non-group") 1027 } 1028 if fieldNum <= 0 { 1029 return fmt.Errorf("proto: ResponseBroadcastTx: illegal tag %d (wire type %d)", fieldNum, wire) 1030 } 1031 switch fieldNum { 1032 case 1: 1033 if wireType != 2 { 1034 return fmt.Errorf("proto: wrong wireType = %d for field CheckTx", wireType) 1035 } 1036 var msglen int 1037 for shift := uint(0); ; shift += 7 { 1038 if shift >= 64 { 1039 return ErrIntOverflowTypes 1040 } 1041 if iNdEx >= l { 1042 return io.ErrUnexpectedEOF 1043 } 1044 b := dAtA[iNdEx] 1045 iNdEx++ 1046 msglen |= int(b&0x7F) << shift 1047 if b < 0x80 { 1048 break 1049 } 1050 } 1051 if msglen < 0 { 1052 return ErrInvalidLengthTypes 1053 } 1054 postIndex := iNdEx + msglen 1055 if postIndex < 0 { 1056 return ErrInvalidLengthTypes 1057 } 1058 if postIndex > l { 1059 return io.ErrUnexpectedEOF 1060 } 1061 if m.CheckTx == nil { 1062 m.CheckTx = &types.ResponseCheckTx{} 1063 } 1064 if err := m.CheckTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1065 return err 1066 } 1067 iNdEx = postIndex 1068 case 2: 1069 if wireType != 2 { 1070 return fmt.Errorf("proto: wrong wireType = %d for field DeliverTx", wireType) 1071 } 1072 var msglen int 1073 for shift := uint(0); ; shift += 7 { 1074 if shift >= 64 { 1075 return ErrIntOverflowTypes 1076 } 1077 if iNdEx >= l { 1078 return io.ErrUnexpectedEOF 1079 } 1080 b := dAtA[iNdEx] 1081 iNdEx++ 1082 msglen |= int(b&0x7F) << shift 1083 if b < 0x80 { 1084 break 1085 } 1086 } 1087 if msglen < 0 { 1088 return ErrInvalidLengthTypes 1089 } 1090 postIndex := iNdEx + msglen 1091 if postIndex < 0 { 1092 return ErrInvalidLengthTypes 1093 } 1094 if postIndex > l { 1095 return io.ErrUnexpectedEOF 1096 } 1097 if m.DeliverTx == nil { 1098 m.DeliverTx = &types.ResponseDeliverTx{} 1099 } 1100 if err := m.DeliverTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1101 return err 1102 } 1103 iNdEx = postIndex 1104 default: 1105 iNdEx = preIndex 1106 skippy, err := skipTypes(dAtA[iNdEx:]) 1107 if err != nil { 1108 return err 1109 } 1110 if skippy < 0 { 1111 return ErrInvalidLengthTypes 1112 } 1113 if (iNdEx + skippy) < 0 { 1114 return ErrInvalidLengthTypes 1115 } 1116 if (iNdEx + skippy) > l { 1117 return io.ErrUnexpectedEOF 1118 } 1119 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1120 iNdEx += skippy 1121 } 1122 } 1123 1124 if iNdEx > l { 1125 return io.ErrUnexpectedEOF 1126 } 1127 return nil 1128 } 1129 func skipTypes(dAtA []byte) (n int, err error) { 1130 l := len(dAtA) 1131 iNdEx := 0 1132 depth := 0 1133 for iNdEx < l { 1134 var wire uint64 1135 for shift := uint(0); ; shift += 7 { 1136 if shift >= 64 { 1137 return 0, ErrIntOverflowTypes 1138 } 1139 if iNdEx >= l { 1140 return 0, io.ErrUnexpectedEOF 1141 } 1142 b := dAtA[iNdEx] 1143 iNdEx++ 1144 wire |= (uint64(b) & 0x7F) << shift 1145 if b < 0x80 { 1146 break 1147 } 1148 } 1149 wireType := int(wire & 0x7) 1150 switch wireType { 1151 case 0: 1152 for shift := uint(0); ; shift += 7 { 1153 if shift >= 64 { 1154 return 0, ErrIntOverflowTypes 1155 } 1156 if iNdEx >= l { 1157 return 0, io.ErrUnexpectedEOF 1158 } 1159 iNdEx++ 1160 if dAtA[iNdEx-1] < 0x80 { 1161 break 1162 } 1163 } 1164 case 1: 1165 iNdEx += 8 1166 case 2: 1167 var length int 1168 for shift := uint(0); ; shift += 7 { 1169 if shift >= 64 { 1170 return 0, ErrIntOverflowTypes 1171 } 1172 if iNdEx >= l { 1173 return 0, io.ErrUnexpectedEOF 1174 } 1175 b := dAtA[iNdEx] 1176 iNdEx++ 1177 length |= (int(b) & 0x7F) << shift 1178 if b < 0x80 { 1179 break 1180 } 1181 } 1182 if length < 0 { 1183 return 0, ErrInvalidLengthTypes 1184 } 1185 iNdEx += length 1186 case 3: 1187 depth++ 1188 case 4: 1189 if depth == 0 { 1190 return 0, ErrUnexpectedEndOfGroupTypes 1191 } 1192 depth-- 1193 case 5: 1194 iNdEx += 4 1195 default: 1196 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1197 } 1198 if iNdEx < 0 { 1199 return 0, ErrInvalidLengthTypes 1200 } 1201 if depth == 0 { 1202 return iNdEx, nil 1203 } 1204 } 1205 return 0, io.ErrUnexpectedEOF 1206 } 1207 1208 var ( 1209 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 1210 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 1211 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 1212 )