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