Rename proto Req/Res to Pagination (#6796)
* Rename proto Req to Pagination * Change Res to Pagination Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
515b25b94e
commit
69bbb8b327
|
@ -42,7 +42,7 @@ message QueryAllBalancesRequest {
|
|||
// address is the address to query balances for
|
||||
bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
|
||||
cosmos.query.PageRequest req = 2;
|
||||
cosmos.query.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method
|
||||
|
@ -51,7 +51,7 @@ message QueryAllBalancesResponse {
|
|||
repeated cosmos.Coin balances = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC method
|
||||
|
|
|
@ -71,14 +71,14 @@ message QueryValidatorSlashesRequest {
|
|||
bytes validator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
|
||||
uint64 starting_height = 2;
|
||||
uint64 ending_height = 3;
|
||||
cosmos.query.PageRequest req = 4;
|
||||
cosmos.query.PageRequest pagination = 4;
|
||||
}
|
||||
|
||||
// QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method
|
||||
message QueryValidatorSlashesResponse {
|
||||
repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegationRewardsRequest is the request type for the Query/DelegationRewards RPC method
|
||||
|
|
|
@ -28,12 +28,12 @@ message QueryEvidenceResponse {
|
|||
|
||||
// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC method
|
||||
message QueryAllEvidenceRequest {
|
||||
cosmos.query.PageRequest req = 1;
|
||||
cosmos.query.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC method
|
||||
message QueryAllEvidenceResponse {
|
||||
repeated google.protobuf.Any evidence = 1;
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
|
|
@ -56,14 +56,14 @@ message QueryProposalsRequest {
|
|||
// Deposit addresses from the proposals.
|
||||
bytes depositor = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
|
||||
cosmos.query.PageRequest req = 4;
|
||||
cosmos.query.PageRequest pagination = 4;
|
||||
}
|
||||
|
||||
// QueryProposalsResponse is the response type for the Query/Proposals RPC method
|
||||
message QueryProposalsResponse {
|
||||
repeated Proposal proposals = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryVoteRequest is the request type for the Query/Vote RPC method
|
||||
|
@ -85,14 +85,14 @@ message QueryVotesRequest {
|
|||
// unique id of the proposal
|
||||
uint64 proposal_id = 1;
|
||||
|
||||
cosmos.query.PageRequest req = 2;
|
||||
cosmos.query.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryVotesResponse is the response type for the Query/Votes RPC method
|
||||
message QueryVotesResponse {
|
||||
repeated Vote votes = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryParamsRequest is the request type for the Query/Params RPC method
|
||||
|
@ -126,14 +126,14 @@ message QueryDepositsRequest {
|
|||
// unique id of the proposal
|
||||
uint64 proposal_id = 1;
|
||||
|
||||
cosmos.query.PageRequest req = 2;
|
||||
cosmos.query.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDepositsResponse is the response type for the Query/Deposits RPC method
|
||||
message QueryDepositsResponse {
|
||||
repeated Deposit deposits = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryTallyResultRequest is the request type for the Query/Tally RPC method
|
||||
|
|
|
@ -8,7 +8,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/types/query";
|
|||
//
|
||||
// message SomeRequest {
|
||||
// Foo some_parameter = 1;
|
||||
// PageRequest page = 2;
|
||||
// PageRequest pagination = 2;
|
||||
// }
|
||||
message PageRequest {
|
||||
// key is a value returned in PageResponse.next_key to begin
|
||||
|
|
|
@ -41,12 +41,12 @@ message QuerySigningInfoResponse{
|
|||
|
||||
// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC method
|
||||
message QuerySigningInfosRequest{
|
||||
cosmos.query.PageRequest req = 1;
|
||||
cosmos.query.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC method
|
||||
message QuerySigningInfosResponse{
|
||||
// info is the signing info of all validators
|
||||
repeated cosmos.slashing.ValidatorSigningInfo info = 1[(gogoproto.nullable)= false];
|
||||
cosmos.query.PageResponse res =2;
|
||||
cosmos.query.PageResponse pagination =2;
|
||||
}
|
||||
|
|
|
@ -56,14 +56,14 @@ service Query {
|
|||
message QueryValidatorsRequest{
|
||||
string status = 1;
|
||||
|
||||
cosmos.query.PageRequest req = 2;
|
||||
cosmos.query.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryValidatorsResponse is response type for the Query/Validators RPC method
|
||||
message QueryValidatorsResponse {
|
||||
repeated cosmos.staking.Validator validators = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryValidatorRequest is response type for the Query/Validator RPC method
|
||||
|
@ -80,28 +80,28 @@ message QueryValidatorResponse {
|
|||
message QueryValidatorDelegationsRequest {
|
||||
bytes validator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
|
||||
|
||||
cosmos.query.PageRequest req = 2;
|
||||
cosmos.query.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryValidatorDelegationsRequest is response type for the Query/ValidatorDelegations RPC method
|
||||
message QueryValidatorDelegationsResponse {
|
||||
repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryValidatorUnbondingDelegationsRequest is required type for the Query/ValidatorUnbondingDelegations RPC method
|
||||
message QueryValidatorUnbondingDelegationsRequest {
|
||||
bytes validator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
|
||||
|
||||
cosmos.query.PageRequest req = 2;
|
||||
cosmos.query.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryValidatorUnbondingDelegationsResponse is response type for the Query/ValidatorUnbondingDelegations RPC method
|
||||
message QueryValidatorUnbondingDelegationsResponse {
|
||||
repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegationRequest is request type for the Query/Delegation RPC method
|
||||
|
@ -132,27 +132,27 @@ message QueryUnbondingDelegationResponse {
|
|||
message QueryDelegatorDelegationsRequest {
|
||||
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
|
||||
cosmos.query.PageRequest req = 2;
|
||||
cosmos.query.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method
|
||||
message QueryDelegatorDelegationsResponse {
|
||||
repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorUnbondingDelegationsRequest is request type for the Query/DelegatorUnbondingDelegations RPC method
|
||||
message QueryDelegatorUnbondingDelegationsRequest {
|
||||
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
|
||||
cosmos.query.PageRequest req = 2;
|
||||
cosmos.query.PageRequest pagination = 2;
|
||||
}
|
||||
// QueryUnbondingDelegatorDelegationsResponse is response type for the Query/UnbondingDelegatorDelegations RPC method
|
||||
message QueryDelegatorUnbondingDelegationsResponse {
|
||||
repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryRedelegationsRequest is request type for the Query/Redelegations RPC method
|
||||
|
@ -163,28 +163,28 @@ message QueryRedelegationsRequest {
|
|||
|
||||
bytes dst_validator_addr = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
|
||||
|
||||
cosmos.query.PageRequest req = 4;
|
||||
cosmos.query.PageRequest pagination = 4;
|
||||
}
|
||||
|
||||
// QueryRedelegationsResponse is response type for the Query/Redelegations RPC method
|
||||
message QueryRedelegationsResponse {
|
||||
repeated RedelegationResponse redelegation_responses = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorValidatorsRequest is request type for the Query/DelegatorValidators RPC method
|
||||
message QueryDelegatorValidatorsRequest {
|
||||
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
||||
|
||||
cosmos.query.PageRequest req = 2;
|
||||
cosmos.query.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method
|
||||
message QueryDelegatorValidatorsResponse {
|
||||
repeated Validator validators = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorValidatorRequest is request type for the Query/DelegatorValidator RPC method
|
||||
|
@ -224,5 +224,5 @@ message QueryParamsRequest { }
|
|||
message QueryParamsResponse {
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
}
|
|
@ -63,7 +63,7 @@ message QueryChannelResponse {
|
|||
// QueryChannelsRequest is the request type for the Query/Channels RPC method
|
||||
message QueryChannelsRequest {
|
||||
// pagination request
|
||||
cosmos.query.PageRequest req = 1;
|
||||
cosmos.query.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryChannelsResponse is the response type for the Query/Channels RPC method.
|
||||
|
@ -71,7 +71,7 @@ message QueryChannelsResponse {
|
|||
// list of stored channels of the chain.
|
||||
repeated ibc.channel.IdentifiedChannel channels = 1;
|
||||
// pagination response
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
// query block height
|
||||
int64 height = 3;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ message QueryConnectionChannelsRequest {
|
|||
// connection unique identifier
|
||||
string connection = 1;
|
||||
// pagination request
|
||||
cosmos.query.PageRequest req = 2;
|
||||
cosmos.query.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method
|
||||
|
@ -89,7 +89,7 @@ message QueryConnectionChannelsResponse {
|
|||
// list of channels associated with a connection.
|
||||
repeated ibc.channel.IdentifiedChannel channels = 1;
|
||||
// pagination response
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
// query block height
|
||||
int64 height = 3;
|
||||
}
|
||||
|
@ -124,14 +124,14 @@ message QueryPacketCommitmentsRequest {
|
|||
// channel unique identifier
|
||||
string channel_id = 2 [(gogoproto.customname) = "ChannelID"];
|
||||
// pagination request
|
||||
cosmos.query.PageRequest req = 3;
|
||||
cosmos.query.PageRequest pagination = 3;
|
||||
}
|
||||
|
||||
// QueryPacketCommitmentsResponse is the request type for the Query/QueryPacketCommitments RPC method
|
||||
message QueryPacketCommitmentsResponse {
|
||||
repeated ibc.channel.PacketAckCommitment commitments = 1;
|
||||
// pagination response
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
// query block height
|
||||
int64 height = 3;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ message QueryConnectionResponse {
|
|||
|
||||
// QueryConnectionsRequest is the request type for the Query/Connections RPC method
|
||||
message QueryConnectionsRequest {
|
||||
cosmos.query.PageRequest req = 1;
|
||||
cosmos.query.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryConnectionsResponse is the response type for the Query/Connections RPC method.
|
||||
|
@ -49,7 +49,7 @@ message QueryConnectionsResponse {
|
|||
// list of stored connections of the chain.
|
||||
repeated ibc.connection.ConnectionEnd connections = 1;
|
||||
// pagination response
|
||||
cosmos.query.PageResponse res = 2;
|
||||
cosmos.query.PageResponse pagination = 2;
|
||||
// query block height
|
||||
int64 height = 3;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ done
|
|||
|
||||
# generate codec/testdata proto code
|
||||
protoc -I "proto" -I "third_party/proto" -I "testutil/testdata" --gocosmos_out=plugins=interfacetype+grpc,\
|
||||
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. ./codec/testdata/proto.proto
|
||||
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. ./testutil/testdata/proto.proto
|
||||
|
||||
# move proto files to the right places
|
||||
cp -r github.com/cosmos/cosmos-sdk/* ./
|
||||
|
|
|
@ -656,44 +656,44 @@ func init() {
|
|||
func init() { proto.RegisterFile("proto.proto", fileDescriptor_2fcc84b9998d60d8) }
|
||||
|
||||
var fileDescriptor_2fcc84b9998d60d8 = []byte{
|
||||
// 583 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x6e, 0xd4, 0x30,
|
||||
0x10, 0xc7, 0x6b, 0xb6, 0x9f, 0xb3, 0x51, 0x17, 0x4c, 0x41, 0x69, 0x0e, 0x69, 0x15, 0x09, 0x75,
|
||||
0x25, 0x68, 0x22, 0x5a, 0xf5, 0xd2, 0x03, 0x52, 0x5a, 0x16, 0x2a, 0xa1, 0x5e, 0x52, 0xc4, 0x81,
|
||||
0x4b, 0xe5, 0x4d, 0x5c, 0xaf, 0xd5, 0xc4, 0x2e, 0x71, 0x52, 0x35, 0x3c, 0x05, 0xaf, 0xc0, 0xd3,
|
||||
0xc0, 0x71, 0x8f, 0x9c, 0x10, 0xda, 0x7d, 0x0b, 0x4e, 0x28, 0xdf, 0x4b, 0xb5, 0xaa, 0xf6, 0x92,
|
||||
0xcc, 0x8c, 0xff, 0xf3, 0xb3, 0x3d, 0x7f, 0x43, 0xf7, 0x26, 0x96, 0x89, 0xb4, 0x8b, 0x2f, 0x5e,
|
||||
0x4f, 0xa8, 0x4a, 0x02, 0x92, 0x10, 0x63, 0x9b, 0x49, 0xc9, 0x42, 0xea, 0x14, 0xf5, 0x61, 0x7a,
|
||||
0xe5, 0x10, 0x91, 0x95, 0x22, 0x63, 0x8b, 0x49, 0x26, 0x8b, 0xd0, 0xc9, 0xa3, 0xb2, 0x6a, 0xed,
|
||||
0x43, 0xe7, 0xad, 0x64, 0x18, 0xc3, 0xb2, 0xe2, 0x5f, 0xa9, 0x8e, 0x76, 0x51, 0x7f, 0xc3, 0x2b,
|
||||
0xe2, 0xbc, 0x26, 0x48, 0x44, 0xf5, 0x47, 0x65, 0x2d, 0x8f, 0xad, 0x23, 0xe8, 0x9c, 0x92, 0x04,
|
||||
0xeb, 0xb0, 0x16, 0x49, 0xc1, 0xaf, 0x69, 0x5c, 0x75, 0xd4, 0x29, 0xde, 0x82, 0x95, 0x90, 0xdf,
|
||||
0x52, 0x55, 0x74, 0xad, 0x78, 0x65, 0x62, 0xbd, 0x87, 0x8d, 0x33, 0xa2, 0x5c, 0xc1, 0x23, 0x12,
|
||||
0xe2, 0x57, 0xb0, 0x4a, 0x8a, 0xa8, 0xe8, 0xed, 0x1e, 0x6c, 0xd9, 0xe5, 0xa1, 0xed, 0xfa, 0xd0,
|
||||
0xb6, 0x2b, 0x32, 0xaf, 0xd2, 0x60, 0x0d, 0xd0, 0x5d, 0x01, 0xeb, 0x78, 0xe8, 0xce, 0x3a, 0x05,
|
||||
0xed, 0x8c, 0xa8, 0x96, 0x75, 0x08, 0x30, 0x22, 0xea, 0x72, 0x01, 0xde, 0xc6, 0xa8, 0x6e, 0xb2,
|
||||
0xce, 0xa1, 0x57, 0x42, 0x5a, 0xce, 0x31, 0x6c, 0xe6, 0x9c, 0x05, 0x59, 0xda, 0x68, 0xa6, 0xd7,
|
||||
0xda, 0x83, 0xee, 0xc0, 0x1f, 0x49, 0x8f, 0x7e, 0x49, 0xa9, 0x2a, 0x67, 0x43, 0x95, 0x22, 0x8c,
|
||||
0x36, 0xb3, 0x29, 0x53, 0xab, 0x0f, 0x5a, 0x29, 0x54, 0x37, 0x52, 0x28, 0xfa, 0x80, 0xf2, 0x05,
|
||||
0xf4, 0x2e, 0x48, 0x76, 0x46, 0xc3, 0xb0, 0xc1, 0xd6, 0x6e, 0xa0, 0x19, 0x37, 0x6c, 0x78, 0xdc,
|
||||
0xca, 0x2a, 0xa8, 0x01, 0xeb, 0x2c, 0xa6, 0x34, 0xe1, 0x82, 0x55, 0xda, 0x26, 0xb7, 0x06, 0xb0,
|
||||
0xf9, 0x91, 0xaa, 0x24, 0xbf, 0x42, 0x45, 0x3d, 0x04, 0x20, 0x22, 0x5b, 0x68, 0x7e, 0x44, 0x64,
|
||||
0xd5, 0x85, 0x07, 0xd0, 0x6b, 0x30, 0xd5, 0xae, 0x07, 0x73, 0x7c, 0x78, 0x6a, 0xd7, 0xcf, 0xd2,
|
||||
0x6e, 0x86, 0x35, 0x6b, 0xc3, 0x27, 0x58, 0xcb, 0x31, 0xe7, 0x8a, 0xe1, 0x0f, 0xb0, 0xa6, 0x38,
|
||||
0x13, 0x34, 0x56, 0x3a, 0xda, 0xed, 0xf4, 0xb5, 0x93, 0xd7, 0x7f, 0x7f, 0xef, 0xec, 0x33, 0x9e,
|
||||
0x8c, 0xd2, 0xa1, 0xed, 0xcb, 0xc8, 0xf1, 0xa5, 0x8a, 0xa4, 0xaa, 0x7e, 0xfb, 0x2a, 0xb8, 0x76,
|
||||
0x92, 0xec, 0x86, 0x2a, 0xdb, 0xf5, 0x7d, 0x37, 0x08, 0x62, 0xaa, 0x94, 0x57, 0x13, 0xac, 0x21,
|
||||
0x3c, 0x39, 0x21, 0xc1, 0x79, 0x1a, 0x26, 0xfc, 0x82, 0x33, 0x41, 0x92, 0x34, 0xa6, 0xd8, 0x04,
|
||||
0x50, 0x75, 0x52, 0x6d, 0xe2, 0xcd, 0x54, 0xf0, 0x1e, 0xf4, 0x22, 0x12, 0x72, 0x9f, 0xcb, 0x54,
|
||||
0x5d, 0x5e, 0x71, 0x1a, 0x06, 0xfa, 0xca, 0x2e, 0xea, 0x6b, 0xde, 0x66, 0x53, 0x7e, 0x97, 0x57,
|
||||
0x8f, 0x97, 0xc7, 0xdf, 0x77, 0xd0, 0xc1, 0x0f, 0x04, 0xdd, 0xfc, 0xf0, 0x17, 0x34, 0xbe, 0xe5,
|
||||
0x3e, 0xc5, 0x47, 0xb0, 0x9c, 0x5b, 0x8b, 0x9f, 0xb5, 0x77, 0x9e, 0x79, 0x13, 0xc6, 0xf3, 0xfb,
|
||||
0xe5, 0x6a, 0x6c, 0x2e, 0xac, 0xd7, 0x06, 0xe2, 0xed, 0x56, 0x73, 0xcf, 0x7b, 0xc3, 0x98, 0xb7,
|
||||
0x54, 0x21, 0xde, 0x94, 0x53, 0x74, 0x45, 0x86, 0xf5, 0x56, 0xf6, 0xbf, 0xcd, 0xc6, 0xf6, 0x9c,
|
||||
0x95, 0xb2, 0xff, 0x64, 0xf0, 0x73, 0x62, 0xa2, 0xf1, 0xc4, 0x44, 0x7f, 0x26, 0x26, 0xfa, 0x36,
|
||||
0x35, 0x97, 0xc6, 0x53, 0x73, 0xe9, 0xd7, 0xd4, 0x5c, 0xfa, 0xfc, 0xf2, 0xc1, 0xf9, 0xfb, 0x32,
|
||||
0xa0, 0xbe, 0x53, 0x63, 0x87, 0xab, 0xc5, 0x63, 0x39, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0x6f,
|
||||
0x03, 0x13, 0xf7, 0x98, 0x04, 0x00, 0x00,
|
||||
// 585 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x4e, 0xdc, 0x3e,
|
||||
0x10, 0xc7, 0xf1, 0x6f, 0xf9, 0x3b, 0xbb, 0x62, 0x7f, 0x75, 0x69, 0xb5, 0xe4, 0x10, 0x50, 0xa4,
|
||||
0x8a, 0x3d, 0x94, 0xac, 0x0a, 0xe2, 0xc2, 0xa1, 0x52, 0xa0, 0xb4, 0x2b, 0x55, 0x5c, 0x42, 0xd5,
|
||||
0x43, 0x2f, 0xc8, 0x9b, 0x18, 0xaf, 0x45, 0x62, 0xd3, 0x8c, 0x83, 0x48, 0x9f, 0xa2, 0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x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
|
|
@ -16,19 +16,19 @@ import (
|
|||
// to the client.
|
||||
func FilteredPaginate(
|
||||
prefixStore types.KVStore,
|
||||
req *PageRequest,
|
||||
pageRequest *PageRequest,
|
||||
onResult func(key []byte, value []byte, accumulate bool) (bool, error),
|
||||
) (*PageResponse, error) {
|
||||
|
||||
// if the PageRequest is nil, use default PageRequest
|
||||
if req == nil {
|
||||
req = &PageRequest{}
|
||||
if pageRequest == nil {
|
||||
pageRequest = &PageRequest{}
|
||||
}
|
||||
|
||||
offset := req.Offset
|
||||
key := req.Key
|
||||
limit := req.Limit
|
||||
countTotal := req.CountTotal
|
||||
offset := pageRequest.Offset
|
||||
key := pageRequest.Key
|
||||
limit := pageRequest.Limit
|
||||
countTotal := pageRequest.CountTotal
|
||||
|
||||
if offset > 0 && key != nil {
|
||||
return nil, fmt.Errorf("invalid request, either offset or key is expected, got both")
|
||||
|
|
|
@ -117,7 +117,7 @@ func ExampleFilteredPaginate() {
|
|||
accountStore := prefix.NewStore(balancesStore, addr1.Bytes())
|
||||
|
||||
var balResult sdk.Coins
|
||||
res, err := query.FilteredPaginate(accountStore, pageReq, func(key []byte, value []byte, accumulate bool) (bool, error) {
|
||||
pageRes, err := query.FilteredPaginate(accountStore, pageReq, func(key []byte, value []byte, accumulate bool) (bool, error) {
|
||||
var bal sdk.Coin
|
||||
err := appCodec.UnmarshalBinaryBare(value, &bal)
|
||||
if err != nil {
|
||||
|
@ -139,9 +139,9 @@ func ExampleFilteredPaginate() {
|
|||
if err != nil { // should return no error
|
||||
fmt.Println(err)
|
||||
}
|
||||
fmt.Println(&types.QueryAllBalancesResponse{Balances: balResult, Res: res})
|
||||
fmt.Println(&types.QueryAllBalancesResponse{Balances: balResult, Pagination: pageRes})
|
||||
// Output:
|
||||
// balances:<denom:"test0denom" amount:"250" > res:<next_key:"test1denom" total:5 >
|
||||
// balances:<denom:"test0denom" amount:"250" > pagination:<next_key:"test1denom" total:5 >
|
||||
}
|
||||
|
||||
func execFilterPaginate(store sdk.KVStore, pageReq *query.PageRequest, appCodec codec.Marshaler) (balances sdk.Coins, res *query.PageResponse, err error) {
|
||||
|
|
|
@ -14,19 +14,19 @@ const defaultLimit = 100
|
|||
// provided PageRequest. onResult should be used to do actual unmarshaling.
|
||||
func Paginate(
|
||||
prefixStore types.KVStore,
|
||||
req *PageRequest,
|
||||
pageRequest *PageRequest,
|
||||
onResult func(key []byte, value []byte) error,
|
||||
) (*PageResponse, error) {
|
||||
|
||||
// if the PageRequest is nil, use default PageRequest
|
||||
if req == nil {
|
||||
req = &PageRequest{}
|
||||
if pageRequest == nil {
|
||||
pageRequest = &PageRequest{}
|
||||
}
|
||||
|
||||
offset := req.Offset
|
||||
key := req.Key
|
||||
limit := req.Limit
|
||||
countTotal := req.CountTotal
|
||||
offset := pageRequest.Offset
|
||||
key := pageRequest.Key
|
||||
limit := pageRequest.Limit
|
||||
countTotal := pageRequest.CountTotal
|
||||
|
||||
if offset > 0 && key != nil {
|
||||
return nil, fmt.Errorf("invalid request, either offset or key is expected, got both")
|
||||
|
|
|
@ -27,7 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|||
//
|
||||
// message SomeRequest {
|
||||
// Foo some_parameter = 1;
|
||||
// PageRequest page = 2;
|
||||
// PageRequest pagination = 2;
|
||||
// }
|
||||
type PageRequest struct {
|
||||
// key is a value returned in PageResponse.next_key to begin
|
||||
|
|
|
@ -59,8 +59,8 @@ func TestPagination(t *testing.T) {
|
|||
request := types.NewQueryAllBalancesRequest(addr1, pageReq)
|
||||
res, err := queryClient.AllBalances(gocontext.Background(), request)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, res.Res.Total, uint64(numBalances))
|
||||
require.NotNil(t, res.Res.NextKey)
|
||||
require.Equal(t, res.Pagination.Total, uint64(numBalances))
|
||||
require.NotNil(t, res.Pagination.NextKey)
|
||||
require.LessOrEqual(t, res.Balances.Len(), defaultLimit)
|
||||
|
||||
t.Log("verify page request with limit > defaultLimit, returns less or equal to `limit` records")
|
||||
|
@ -68,8 +68,8 @@ func TestPagination(t *testing.T) {
|
|||
request = types.NewQueryAllBalancesRequest(addr1, pageReq)
|
||||
res, err = queryClient.AllBalances(gocontext.Background(), request)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, res.Res.Total, uint64(0))
|
||||
require.NotNil(t, res.Res.NextKey)
|
||||
require.Equal(t, res.Pagination.Total, uint64(0))
|
||||
require.NotNil(t, res.Pagination.NextKey)
|
||||
require.LessOrEqual(t, res.Balances.Len(), overLimit)
|
||||
|
||||
t.Log("verify paginate with custom limit and countTotal true")
|
||||
|
@ -78,8 +78,8 @@ func TestPagination(t *testing.T) {
|
|||
res, err = queryClient.AllBalances(gocontext.Background(), request)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, res.Balances.Len(), underLimit)
|
||||
require.NotNil(t, res.Res.NextKey)
|
||||
require.Equal(t, res.Res.Total, uint64(numBalances))
|
||||
require.NotNil(t, res.Pagination.NextKey)
|
||||
require.Equal(t, res.Pagination.Total, uint64(numBalances))
|
||||
|
||||
t.Log("verify paginate with custom limit and countTotal false")
|
||||
pageReq = &query.PageRequest{Limit: defaultLimit, CountTotal: false}
|
||||
|
@ -87,27 +87,27 @@ func TestPagination(t *testing.T) {
|
|||
res, err = queryClient.AllBalances(gocontext.Background(), request)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, res.Balances.Len(), defaultLimit)
|
||||
require.NotNil(t, res.Res.NextKey)
|
||||
require.Equal(t, res.Res.Total, uint64(0))
|
||||
require.NotNil(t, res.Pagination.NextKey)
|
||||
require.Equal(t, res.Pagination.Total, uint64(0))
|
||||
|
||||
t.Log("verify paginate with custom limit, key and countTotal false")
|
||||
pageReq = &query.PageRequest{Key: res.Res.NextKey, Limit: defaultLimit, CountTotal: false}
|
||||
pageReq = &query.PageRequest{Key: res.Pagination.NextKey, Limit: defaultLimit, CountTotal: false}
|
||||
request = types.NewQueryAllBalancesRequest(addr1, pageReq)
|
||||
res, err = queryClient.AllBalances(gocontext.Background(), request)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, res.Balances.Len(), defaultLimit)
|
||||
require.NotNil(t, res.Res.NextKey)
|
||||
require.Equal(t, res.Res.Total, uint64(0))
|
||||
require.NotNil(t, res.Pagination.NextKey)
|
||||
require.Equal(t, res.Pagination.Total, uint64(0))
|
||||
|
||||
t.Log("verify paginate for last page, results in records less than max limit")
|
||||
pageReq = &query.PageRequest{Key: res.Res.NextKey, Limit: defaultLimit, CountTotal: false}
|
||||
pageReq = &query.PageRequest{Key: res.Pagination.NextKey, Limit: defaultLimit, CountTotal: false}
|
||||
request = types.NewQueryAllBalancesRequest(addr1, pageReq)
|
||||
res, err = queryClient.AllBalances(gocontext.Background(), request)
|
||||
require.NoError(t, err)
|
||||
require.LessOrEqual(t, res.Balances.Len(), defaultLimit)
|
||||
require.Equal(t, res.Balances.Len(), lastPageRecords)
|
||||
require.Nil(t, res.Res.NextKey)
|
||||
require.Equal(t, res.Res.Total, uint64(0))
|
||||
require.Nil(t, res.Pagination.NextKey)
|
||||
require.Equal(t, res.Pagination.Total, uint64(0))
|
||||
|
||||
t.Log("verify paginate with offset and limit")
|
||||
pageReq = &query.PageRequest{Offset: 200, Limit: defaultLimit, CountTotal: false}
|
||||
|
@ -116,8 +116,8 @@ func TestPagination(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
require.LessOrEqual(t, res.Balances.Len(), defaultLimit)
|
||||
require.Equal(t, res.Balances.Len(), lastPageRecords)
|
||||
require.Nil(t, res.Res.NextKey)
|
||||
require.Equal(t, res.Res.Total, uint64(0))
|
||||
require.Nil(t, res.Pagination.NextKey)
|
||||
require.Equal(t, res.Pagination.Total, uint64(0))
|
||||
|
||||
t.Log("verify paginate with offset and limit")
|
||||
pageReq = &query.PageRequest{Offset: 100, Limit: defaultLimit, CountTotal: false}
|
||||
|
@ -125,11 +125,11 @@ func TestPagination(t *testing.T) {
|
|||
res, err = queryClient.AllBalances(gocontext.Background(), request)
|
||||
require.NoError(t, err)
|
||||
require.LessOrEqual(t, res.Balances.Len(), defaultLimit)
|
||||
require.NotNil(t, res.Res.NextKey)
|
||||
require.Equal(t, res.Res.Total, uint64(0))
|
||||
require.NotNil(t, res.Pagination.NextKey)
|
||||
require.Equal(t, res.Pagination.Total, uint64(0))
|
||||
|
||||
t.Log("verify paginate with offset and key - error")
|
||||
pageReq = &query.PageRequest{Key: res.Res.NextKey, Offset: 100, Limit: defaultLimit, CountTotal: false}
|
||||
pageReq = &query.PageRequest{Key: res.Pagination.NextKey, Offset: 100, Limit: defaultLimit, CountTotal: false}
|
||||
request = types.NewQueryAllBalancesRequest(addr1, pageReq)
|
||||
res, err = queryClient.AllBalances(gocontext.Background(), request)
|
||||
require.Error(t, err)
|
||||
|
@ -141,7 +141,7 @@ func TestPagination(t *testing.T) {
|
|||
res, err = queryClient.AllBalances(gocontext.Background(), request)
|
||||
require.NoError(t, err)
|
||||
require.LessOrEqual(t, res.Balances.Len(), 0)
|
||||
require.Nil(t, res.Res.NextKey)
|
||||
require.Nil(t, res.Pagination.NextKey)
|
||||
}
|
||||
|
||||
func ExamplePaginate() {
|
||||
|
@ -168,7 +168,7 @@ func ExamplePaginate() {
|
|||
authStore := ctx.KVStore(app.GetKey(authtypes.StoreKey))
|
||||
balancesStore := prefix.NewStore(authStore, types.BalancesPrefix)
|
||||
accountStore := prefix.NewStore(balancesStore, addr1.Bytes())
|
||||
res, err := query.Paginate(accountStore, request.Req, func(key []byte, value []byte) error {
|
||||
pageRes, err := query.Paginate(accountStore, request.Pagination, func(key []byte, value []byte) error {
|
||||
var tempRes sdk.Coin
|
||||
err := app.Codec().UnmarshalBinaryBare(value, &tempRes)
|
||||
if err != nil {
|
||||
|
@ -180,9 +180,9 @@ func ExamplePaginate() {
|
|||
if err != nil { // should return no error
|
||||
fmt.Println(err)
|
||||
}
|
||||
fmt.Println(&types.QueryAllBalancesResponse{Balances: balResult, Res: res})
|
||||
fmt.Println(&types.QueryAllBalancesResponse{Balances: balResult, Pagination: pageRes})
|
||||
// Output:
|
||||
// balances:<denom:"foo0denom" amount:"100" > res:<next_key:"foo1denom" total:2 >
|
||||
// balances:<denom:"foo0denom" amount:"100" > pagination:<next_key:"foo1denom" total:2 >
|
||||
}
|
||||
|
||||
func setupTest() (*simapp.SimApp, sdk.Context, codec.Marshaler) {
|
||||
|
|
|
@ -52,7 +52,7 @@ func (q BaseKeeper) AllBalances(c context.Context, req *types.QueryAllBalancesRe
|
|||
balancesStore := prefix.NewStore(store, types.BalancesPrefix)
|
||||
accountStore := prefix.NewStore(balancesStore, addr.Bytes())
|
||||
|
||||
res, err := query.Paginate(accountStore, req.Req, func(key []byte, value []byte) error {
|
||||
pageRes, err := query.Paginate(accountStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
var result sdk.Coin
|
||||
err := q.cdc.UnmarshalBinaryBare(value, &result)
|
||||
if err != nil {
|
||||
|
@ -66,7 +66,7 @@ func (q BaseKeeper) AllBalances(c context.Context, req *types.QueryAllBalancesRe
|
|||
return &types.QueryAllBalancesResponse{}, err
|
||||
}
|
||||
|
||||
return &types.QueryAllBalancesResponse{Balances: balances, Res: res}, nil
|
||||
return &types.QueryAllBalancesResponse{Balances: balances, Pagination: pageRes}, nil
|
||||
}
|
||||
|
||||
// TotalSupply implements the Query/TotalSupply gRPC method
|
||||
|
|
|
@ -78,18 +78,18 @@ func (suite *IntegrationTestSuite) TestQueryAllBalances() {
|
|||
suite.Require().NoError(err)
|
||||
suite.Require().NotNil(res)
|
||||
suite.Equal(res.Balances.Len(), 1)
|
||||
suite.NotNil(res.Res.NextKey)
|
||||
suite.NotNil(res.Pagination.NextKey)
|
||||
|
||||
suite.T().Log("query second page with nextkey")
|
||||
pageReq = &query.PageRequest{
|
||||
Key: res.Res.NextKey,
|
||||
Key: res.Pagination.NextKey,
|
||||
Limit: 1,
|
||||
CountTotal: true,
|
||||
}
|
||||
req = types.NewQueryAllBalancesRequest(addr, pageReq)
|
||||
res, err = queryClient.AllBalances(gocontext.Background(), req)
|
||||
suite.Equal(res.Balances.Len(), 1)
|
||||
suite.Nil(res.Res.NextKey)
|
||||
suite.Nil(res.Pagination.NextKey)
|
||||
}
|
||||
|
||||
func (suite *IntegrationTestSuite) TestQueryTotalSupply() {
|
||||
|
|
|
@ -20,10 +20,10 @@ func NewQueryBalanceRequest(addr sdk.AccAddress, denom string) *QueryBalanceRequ
|
|||
|
||||
// NewQueryAllBalancesRequest creates a new instance of QueryAllBalancesRequest.
|
||||
func NewQueryAllBalancesRequest(addr sdk.AccAddress, req *query.PageRequest) *QueryAllBalancesRequest {
|
||||
return &QueryAllBalancesRequest{Address: addr, Req: req}
|
||||
return &QueryAllBalancesRequest{Address: addr, Pagination: req}
|
||||
}
|
||||
|
||||
// QueryTotalSupply defines the params for the following queries:
|
||||
// QueryTotalSupplyParams defines the params for the following queries:
|
||||
//
|
||||
// - 'custom/bank/totalSupply'
|
||||
type QueryTotalSupplyParams struct {
|
||||
|
|
|
@ -135,8 +135,8 @@ func (m *QueryBalanceResponse) GetBalance() *types.Coin {
|
|||
// QueryBalanceRequest is the request type for the Query/AllBalances RPC method
|
||||
type QueryAllBalancesRequest struct {
|
||||
// address is the address to query balances for
|
||||
Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
|
||||
Req *query.PageRequest `protobuf:"bytes,2,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryAllBalancesRequest) Reset() { *m = QueryAllBalancesRequest{} }
|
||||
|
@ -179,9 +179,9 @@ func (m *QueryAllBalancesRequest) GetAddress() github_com_cosmos_cosmos_sdk_type
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryAllBalancesRequest) GetReq() *query.PageRequest {
|
||||
func (m *QueryAllBalancesRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -189,8 +189,8 @@ func (m *QueryAllBalancesRequest) GetReq() *query.PageRequest {
|
|||
// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method
|
||||
type QueryAllBalancesResponse struct {
|
||||
// balances is the balances of the coins
|
||||
Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"`
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryAllBalancesResponse) Reset() { *m = QueryAllBalancesResponse{} }
|
||||
|
@ -233,9 +233,9 @@ func (m *QueryAllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_ty
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryAllBalancesResponse) GetRes() *query.PageResponse {
|
||||
func (m *QueryAllBalancesResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -421,40 +421,40 @@ func init() {
|
|||
func init() { proto.RegisterFile("cosmos/bank/query.proto", fileDescriptor_1b02ea4db7d9aa9f) }
|
||||
|
||||
var fileDescriptor_1b02ea4db7d9aa9f = []byte{
|
||||
// 525 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xcf, 0x6e, 0xd3, 0x4c,
|
||||
0x14, 0xc5, 0xed, 0x56, 0x4d, 0xfa, 0x4d, 0xba, 0x9a, 0xe6, 0x53, 0x53, 0x4b, 0x38, 0x61, 0xc4,
|
||||
0x9f, 0x20, 0x5a, 0x1b, 0xc2, 0x1e, 0x29, 0xee, 0x92, 0x05, 0xc5, 0x05, 0x16, 0x15, 0x1b, 0xc7,
|
||||
0x19, 0x4c, 0x54, 0x67, 0xc6, 0xf1, 0xd8, 0x52, 0xf3, 0x16, 0x48, 0xbc, 0x02, 0x2b, 0x9e, 0xa4,
|
||||
0xcb, 0x2e, 0x11, 0x8b, 0x80, 0x92, 0x1d, 0x8f, 0xc0, 0x0a, 0xcd, 0xcc, 0x75, 0xe5, 0x24, 0x56,
|
||||
0xe8, 0x02, 0x76, 0xf6, 0xcc, 0x9d, 0x73, 0x7f, 0xd7, 0xe7, 0x78, 0xd0, 0x41, 0xc8, 0xc5, 0x98,
|
||||
0x0b, 0x77, 0x10, 0xb0, 0x0b, 0x77, 0x92, 0xd3, 0x74, 0xea, 0x24, 0x29, 0xcf, 0x38, 0x6e, 0xe8,
|
||||
0x0d, 0x47, 0x6e, 0x58, 0x77, 0xa0, 0x4a, 0x15, 0xb8, 0x49, 0x10, 0x8d, 0x58, 0x90, 0x8d, 0x38,
|
||||
0xd3, 0xb5, 0x56, 0x33, 0xe2, 0x11, 0x57, 0x8f, 0xae, 0x7c, 0x82, 0xd5, 0x7d, 0x38, 0x04, 0x42,
|
||||
0x6a, 0x91, 0x5c, 0xa2, 0xfd, 0x57, 0x52, 0xc4, 0x0b, 0xe2, 0x80, 0x85, 0xd4, 0xa7, 0x93, 0x9c,
|
||||
0x8a, 0x0c, 0xbf, 0x40, 0x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,
|
||||
0x00, 0x00, 0x00, 0xff, 0xff, 0x06, 0xd8, 0xbc, 0xab, 0x4e, 0x05, 0x00, 0x00,
|
||||
// 521 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x3f, 0x6f, 0xd3, 0x40,
|
||||
0x1c, 0xf5, 0x15, 0x35, 0x29, 0xbf, 0x74, 0xba, 0x06, 0x35, 0xb5, 0x84, 0x13, 0x4e, 0xfc, 0x09,
|
||||
0x12, 0xb5, 0x21, 0x4c, 0x30, 0x20, 0xc5, 0x1d, 0x19, 0x28, 0x2e, 0x30, 0x54, 0x2c, 0x17, 0xc7,
|
||||
0x98, 0xa8, 0xce, 0x9d, 0x9b, 0xb3, 0xa5, 0xe6, 0x5b, 0xf0, 0x15, 0x58, 0x19, 0xf9, 0x14, 0x1d,
|
||||
0x3b, 0x22, 0x86, 0x80, 0x92, 0x8d, 0x8f, 0xc0, 0x84, 0x7c, 0x77, 0x2e, 0x4e, 0x6c, 0x85, 0x0e,
|
||||
0x74, 0xb3, 0xef, 0xde, 0xbd, 0xdf, 0x7b, 0xf7, 0x9e, 0x0d, 0xbb, 0x3e, 0x17, 0x63, 0x2e, 0x9c,
|
||||
0x01, 0x65, 0x27, 0xce, 0x69, 0x1a, 0x4c, 0xa6, 0x76, 0x3c, 0xe1, 0x09, 0xc7, 0x0d, 0xb5, 0x61,
|
||||
0x67, 0x1b, 0xe6, 0x6d, 0x8d, 0x92, 0x00, 0x27, 0xa6, 0xe1, 0x88, 0xd1, 0x64, 0xc4, 0x99, 0xc2,
|
||||
0x9a, 0xcd, 0x90, 0x87, 0x5c, 0x3e, 0x3a, 0xd9, 0x93, 0x5e, 0xdd, 0xd1, 0x87, 0x34, 0x91, 0x5c,
|
||||
0x24, 0x67, 0xb0, 0xf3, 0x3a, 0x23, 0x71, 0x69, 0x44, 0x99, 0x1f, 0x78, 0xc1, 0x69, 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ef, 0xe9, 0x9f, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0xd4, 0x4d, 0xf4, 0x62, 0x6a, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -745,9 +745,9 @@ func (m *QueryAllBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -787,9 +787,9 @@ func (m *QueryAllBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -990,8 +990,8 @@ func (m *QueryAllBalancesRequest) Size() (n int) {
|
|||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -1009,8 +1009,8 @@ func (m *QueryAllBalancesResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -1343,7 +1343,7 @@ func (m *QueryAllBalancesRequest) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -1370,10 +1370,10 @@ func (m *QueryAllBalancesRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -1466,7 +1466,7 @@ func (m *QueryAllBalancesResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -1493,10 +1493,10 @@ func (m *QueryAllBalancesResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
|
|
@ -199,7 +199,7 @@ $ %s query distribution slashes cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmq
|
|||
ValidatorAddress: validatorAddr,
|
||||
StartingHeight: startHeight,
|
||||
EndingHeight: endHeight,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
|
|
@ -76,7 +76,7 @@ func (k Keeper) ValidatorSlashes(c context.Context, req *types.QueryValidatorSla
|
|||
store := ctx.KVStore(k.storeKey)
|
||||
slashesStore := prefix.NewStore(store, types.GetValidatorSlashEventPrefix(req.ValidatorAddress))
|
||||
|
||||
res, err := query.FilteredPaginate(slashesStore, req.Req, func(key []byte, value []byte, accumulate bool) (bool, error) {
|
||||
pageRes, err := query.FilteredPaginate(slashesStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) {
|
||||
var result types.ValidatorSlashEvent
|
||||
err := k.cdc.UnmarshalBinaryBare(value, &result)
|
||||
|
||||
|
@ -98,7 +98,7 @@ func (k Keeper) ValidatorSlashes(c context.Context, req *types.QueryValidatorSla
|
|||
return &types.QueryValidatorSlashesResponse{}, err
|
||||
}
|
||||
|
||||
return &types.QueryValidatorSlashesResponse{Slashes: events, Res: res}, nil
|
||||
return &types.QueryValidatorSlashesResponse{Slashes: events, Pagination: pageRes}, nil
|
||||
}
|
||||
|
||||
// DelegationRewards the total rewards accrued by a delegation
|
||||
|
|
|
@ -239,7 +239,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorSlashes() {
|
|||
StartingHeight: 10,
|
||||
EndingHeight: 1,
|
||||
}
|
||||
expRes = &types.QueryValidatorSlashesResponse{Res: &query.PageResponse{}}
|
||||
expRes = &types.QueryValidatorSlashesResponse{Pagination: &query.PageResponse{}}
|
||||
},
|
||||
false,
|
||||
},
|
||||
|
@ -251,7 +251,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorSlashes() {
|
|||
StartingHeight: 1,
|
||||
EndingHeight: 10,
|
||||
}
|
||||
expRes = &types.QueryValidatorSlashesResponse{Res: &query.PageResponse{}}
|
||||
expRes = &types.QueryValidatorSlashesResponse{Pagination: &query.PageResponse{}}
|
||||
},
|
||||
true,
|
||||
},
|
||||
|
@ -267,7 +267,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorSlashes() {
|
|||
ValidatorAddress: valAddrs[0],
|
||||
StartingHeight: 1,
|
||||
EndingHeight: 10,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
}
|
||||
|
||||
expRes = &types.QueryValidatorSlashesResponse{
|
||||
|
@ -288,7 +288,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorSlashes() {
|
|||
ValidatorAddress: valAddrs[0],
|
||||
StartingHeight: 1,
|
||||
EndingHeight: 10,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
}
|
||||
|
||||
expRes = &types.QueryValidatorSlashesResponse{
|
||||
|
@ -309,7 +309,7 @@ func (suite *KeeperTestSuite) TestGRPCValidatorSlashes() {
|
|||
ValidatorAddress: valAddrs[0],
|
||||
StartingHeight: 1,
|
||||
EndingHeight: 10,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
}
|
||||
|
||||
expRes = &types.QueryValidatorSlashesResponse{
|
||||
|
|
|
@ -302,7 +302,7 @@ type QueryValidatorSlashesRequest struct {
|
|||
ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty"`
|
||||
StartingHeight uint64 `protobuf:"varint,2,opt,name=starting_height,json=startingHeight,proto3" json:"starting_height,omitempty"`
|
||||
EndingHeight uint64 `protobuf:"varint,3,opt,name=ending_height,json=endingHeight,proto3" json:"ending_height,omitempty"`
|
||||
Req *query.PageRequest `protobuf:"bytes,4,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryValidatorSlashesRequest) Reset() { *m = QueryValidatorSlashesRequest{} }
|
||||
|
@ -359,17 +359,17 @@ func (m *QueryValidatorSlashesRequest) GetEndingHeight() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (m *QueryValidatorSlashesRequest) GetReq() *query.PageRequest {
|
||||
func (m *QueryValidatorSlashesRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method
|
||||
type QueryValidatorSlashesResponse struct {
|
||||
Slashes []ValidatorSlashEvent `protobuf:"bytes,1,rep,name=slashes,proto3" json:"slashes"`
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Slashes []ValidatorSlashEvent `protobuf:"bytes,1,rep,name=slashes,proto3" json:"slashes"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryValidatorSlashesResponse) Reset() { *m = QueryValidatorSlashesResponse{} }
|
||||
|
@ -412,9 +412,9 @@ func (m *QueryValidatorSlashesResponse) GetSlashes() []ValidatorSlashEvent {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryValidatorSlashesResponse) GetRes() *query.PageResponse {
|
||||
func (m *QueryValidatorSlashesResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -901,66 +901,66 @@ func init() {
|
|||
func init() { proto.RegisterFile("cosmos/distribution/query.proto", fileDescriptor_2111c1b119d22af6) }
|
||||
|
||||
var fileDescriptor_2111c1b119d22af6 = []byte{
|
||||
// 940 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0xdc, 0x44,
|
||||
0x14, 0xdf, 0x49, 0xd2, 0x54, 0xbc, 0xb4, 0x24, 0x9d, 0x54, 0x68, 0xeb, 0xd0, 0xdd, 0xc8, 0x05,
|
||||
0xb2, 0x52, 0xa9, 0x4d, 0x36, 0x20, 0x28, 0x82, 0x43, 0xd2, 0x20, 0x55, 0x42, 0x82, 0xed, 0x82,
|
||||
0x0a, 0x54, 0xd0, 0x6a, 0x62, 0x8f, 0xbc, 0x16, 0x5e, 0xcf, 0xc6, 0x33, 0x4e, 0x88, 0xf8, 0x23,
|
||||
0x90, 0x0a, 0x12, 0x07, 0x24, 0x24, 0x0e, 0x5c, 0xf8, 0x04, 0xfd, 0x24, 0x3d, 0x96, 0x1b, 0xa7,
|
||||
0x16, 0x25, 0x9f, 0x02, 0x4e, 0xc8, 0x33, 0x63, 0x67, 0x9d, 0xd8, 0xce, 0x66, 0x89, 0xf6, 0xb6,
|
||||
0xfb, 0xe6, 0xbd, 0xdf, 0xfb, 0xbd, 0xdf, 0xbc, 0x79, 0x33, 0x86, 0xa6, 0xc3, 0x78, 0x9f, 0x71,
|
||||
0xdb, 0xf5, 0xb9, 0x88, 0xfc, 0xad, 0x58, 0xf8, 0x2c, 0xb4, 0xb7, 0x63, 0x1a, 0xed, 0x59, 0x83,
|
||||
0x88, 0x09, 0x86, 0x17, 0x95, 0x83, 0x35, 0xec, 0x60, 0x5c, 0xd5, 0x51, 0xd2, 0xd1, 0x1e, 0x10,
|
||||
0xcf, 0x0f, 0x49, 0xb2, 0xa0, 0x62, 0x8c, 0xcb, 0x1e, 0xf3, 0x98, 0xfc, 0x69, 0x27, 0xbf, 0xb4,
|
||||
0x55, 0x23, 0xd9, 0x1a, 0x50, 0x19, 0x5f, 0x29, 0xca, 0x3f, 0xfc, 0x47, 0xf9, 0x99, 0x97, 0x01,
|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0x32,
|
||||
0xab, 0x2e, 0x7e, 0xad, 0xba, 0xf8, 0x75, 0xc7, 0x89, 0xfb, 0x71, 0x40, 0x04, 0x75, 0x0f, 0x01,
|
||||
0x75, 0xfd, 0x43, 0x60, 0xe6, 0x3f, 0x08, 0x5e, 0xcc, 0xe7, 0xff, 0x28, 0x20, 0xbc, 0x47, 0x27,
|
||||
0xd5, 0x01, 0x78, 0x05, 0xe6, 0xb9, 0x20, 0x91, 0xf0, 0x43, 0xef, 0x41, 0x8f, 0xfa, 0x5e, 0x4f,
|
||||
0xd4, 0xa7, 0x96, 0x51, 0x6b, 0xa6, 0xfb, 0x7c, 0x6a, 0xbe, 0x2d, 0xad, 0xf8, 0x1a, 0x5c, 0xa4,
|
||||
0x72, 0x33, 0x53, 0xb7, 0x69, 0xe9, 0x76, 0x41, 0x19, 0xb5, 0xd3, 0x75, 0x98, 0x8e, 0xe8, 0x76,
|
||||
0x7d, 0x46, 0x4a, 0x74, 0x25, 0x95, 0x48, 0x1d, 0xf6, 0x0e, 0xf1, 0xa8, 0xae, 0xaa, 0x9b, 0x78,
|
||||
0x99, 0xbf, 0x23, 0xb8, 0x5a, 0x52, 0xbb, 0x16, 0xfe, 0x36, 0x9c, 0xe7, 0xca, 0x54, 0x47, 0xcb,
|
||||
0xd3, 0xad, 0xb9, 0x76, 0xab, 0x5a, 0x75, 0x19, 0xff, 0xde, 0x0e, 0x0d, 0x45, 0xda, 0x6a, 0x3a,
|
||||
0x1c, 0xbf, 0x9a, 0x10, 0xe3, 0xb2, 0xb4, 0xb9, 0xb6, 0x51, 0x44, 0x4c, 0xa5, 0x4c, 0x98, 0x71,
|
||||
0xf3, 0x59, 0xca, 0x6c, 0x93, 0x06, 0xd4, 0x93, 0x73, 0xe7, 0xf8, 0xc1, 0x74, 0xd5, 0xda, 0xd8,
|
||||
0xdb, 0xb2, 0xee, 0x38, 0xd9, 0xb6, 0x64, 0x58, 0xe9, 0xb6, 0x14, 0x6e, 0xfb, 0xd4, 0xd9, 0xb5,
|
||||
0xfd, 0xf7, 0x08, 0x1a, 0x65, 0x15, 0x6a, 0xf1, 0xef, 0x0f, 0x9f, 0xf7, 0x44, 0xfc, 0xf9, 0x54,
|
||||
0xb6, 0x4d, 0xea, 0xdc, 0x62, 0x7e, 0xb8, 0xb1, 0x96, 0x68, 0xfc, 0xe8, 0x59, 0xf3, 0xfa, 0x08,
|
||||
0x6c, 0x74, 0x0c, 0x3f, 0x3c, 0xfd, 0x0f, 0x11, 0x98, 0x47, 0x28, 0x7c, 0xcc, 0x04, 0x09, 0x26,
|
||||
0xab, 0xb4, 0xf9, 0x27, 0x82, 0x6b, 0x95, 0x34, 0xb4, 0x1c, 0x1f, 0x1c, 0x95, 0xc3, 0x2a, 0xec,
|
||||
0xc5, 0x43, 0x94, 0xcd, 0x34, 0x93, 0x42, 0x3a, 0x32, 0xfc, 0xf0, 0x3d, 0x38, 0x27, 0x92, 0x3c,
|
||||
0xf5, 0xa9, 0x33, 0x14, 0x57, 0x41, 0x1e, 0x0e, 0xd6, 0x8c, 0x43, 0x76, 0x44, 0x26, 0xa6, 0x6b,
|
||||
0xac, 0x07, 0x6b, 0x21, 0x05, 0xad, 0xe9, 0x1d, 0x80, 0xac, 0x33, 0x95, 0xac, 0x63, 0xb5, 0xf7,
|
||||
0x10, 0x88, 0xf9, 0x13, 0x82, 0x97, 0xf2, 0x79, 0x3f, 0xf1, 0x45, 0xcf, 0x8d, 0xc8, 0x6e, 0xea,
|
||||
0x3d, 0xa1, 0xfa, 0x7f, 0x44, 0xf0, 0xf2, 0x09, 0x44, 0xb4, 0x0a, 0x9f, 0xc3, 0xc2, 0xae, 0x5e,
|
||||
0xfa, 0xff, 0x44, 0xe6, 0x77, 0xf3, 0x59, 0xcc, 0x25, 0xb8, 0x22, 0x69, 0x24, 0xd7, 0x50, 0x1c,
|
||||
0xfa, 0x62, 0xaf, 0xc3, 0x58, 0x90, 0xbe, 0x6e, 0x76, 0xc0, 0x28, 0x5a, 0xd4, 0xc4, 0x3e, 0x85,
|
||||
0x99, 0x01, 0x63, 0xc1, 0x99, 0x1e, 0x7f, 0x89, 0xd8, 0x7e, 0xf4, 0x1c, 0x9c, 0x93, 0x89, 0xf1,
|
||||
0x17, 0x30, 0xab, 0x5e, 0x49, 0x78, 0xa5, 0xf0, 0x3c, 0x1d, 0x7f, 0x92, 0x19, 0xad, 0x93, 0x1d,
|
||||
0x55, 0x01, 0x66, 0x0d, 0xff, 0x81, 0x60, 0xa9, 0xe2, 0x45, 0x82, 0xdf, 0x29, 0xc7, 0x3a, 0xf9,
|
||||
0x79, 0x66, 0xbc, 0x3b, 0x66, 0x74, 0x46, 0xef, 0x21, 0x82, 0xc5, 0x82, 0x97, 0x07, 0x7e, 0x7d,
|
||||
0x04, 0xe0, 0x63, 0x6f, 0x25, 0xe3, 0x8d, 0x53, 0x46, 0x65, 0x34, 0xbe, 0x86, 0x85, 0xa3, 0x77,
|
||||
0x30, 0x5e, 0x1d, 0x01, 0x2c, 0xff, 0x56, 0x31, 0xda, 0xa7, 0x09, 0xc9, 0x92, 0x7f, 0x07, 0x97,
|
||||
0x8e, 0x5d, 0x42, 0xb8, 0x02, 0xaa, 0xec, 0x4e, 0x36, 0xd6, 0x4e, 0x15, 0x93, 0xe5, 0xff, 0x05,
|
||||
0xc1, 0x0b, 0xc5, 0xb3, 0x1f, 0xbf, 0x39, 0x0a, 0x62, 0xc1, 0xa5, 0x65, 0xbc, 0x75, 0xfa, 0xc0,
|
||||
0x5c, 0x4f, 0x14, 0x0c, 0xcd, 0xaa, 0x9e, 0x28, 0x1f, 0xf3, 0x55, 0x3d, 0x51, 0x31, 0x99, 0xcd,
|
||||
0x1a, 0xfe, 0x0d, 0x41, 0xbd, 0x6c, 0x74, 0xe1, 0x9b, 0x23, 0xa0, 0x16, 0xcf, 0x5d, 0xe3, 0xed,
|
||||
0x71, 0x42, 0x33, 0x56, 0x11, 0x5c, 0xcc, 0xcd, 0x2a, 0x6c, 0x95, 0xc3, 0x15, 0x4d, 0x3c, 0xc3,
|
||||
0x1e, 0xd9, 0x3f, 0xcd, 0xb9, 0xf1, 0xfe, 0xe3, 0xfd, 0x06, 0x7a, 0xb2, 0xdf, 0x40, 0x7f, 0xef,
|
||||
0x37, 0xd0, 0xaf, 0x07, 0x8d, 0xda, 0x93, 0x83, 0x46, 0xed, 0xaf, 0x83, 0x46, 0xed, 0xde, 0x6a,
|
||||
0xe5, 0xe4, 0xfb, 0x2a, 0xff, 0xc9, 0x29, 0x07, 0xe1, 0xd6, 0xac, 0xfc, 0xd8, 0x5c, 0xfb, 0x2f,
|
||||
0x00, 0x00, 0xff, 0xff, 0xff, 0xaa, 0x49, 0xeb, 0x16, 0x0f, 0x00, 0x00,
|
||||
// 936 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x6f, 0xdc, 0x44,
|
||||
0x14, 0xdf, 0xd9, 0xa6, 0xa9, 0x78, 0x6d, 0x49, 0x3a, 0xa9, 0xd0, 0xd6, 0xa1, 0xbb, 0x91, 0x0b,
|
||||
0x64, 0x25, 0x54, 0x9b, 0x24, 0x20, 0x48, 0x05, 0x87, 0xa4, 0x41, 0xaa, 0x84, 0x04, 0xdb, 0x05,
|
||||
0x15, 0xa8, 0xa0, 0xd5, 0xc4, 0x1e, 0x79, 0x2d, 0xbc, 0x9e, 0xad, 0x67, 0x9c, 0x10, 0xf1, 0x21,
|
||||
0x90, 0x0a, 0x88, 0x03, 0x12, 0x12, 0x57, 0xae, 0x5c, 0xfa, 0x97, 0xf4, 0x58, 0x6e, 0x9c, 0x5a,
|
||||
0x94, 0xfc, 0x17, 0x9c, 0xd0, 0xce, 0x8c, 0xbd, 0xeb, 0xc4, 0xf6, 0x7e, 0x34, 0xda, 0xdb, 0xee,
|
||||
0x9b, 0xf7, 0x7e, 0xef, 0xf7, 0x3e, 0xe6, 0xcd, 0x33, 0x34, 0x1c, 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x26, 0x74, 0x19, 0x6e, 0xc1, 0x39, 0xae, 0x44, 0x35, 0xb4, 0x72,
|
||||
0xa6, 0x79, 0x7e, 0xbd, 0x59, 0x5e, 0x03, 0x69, 0xff, 0xfe, 0x1e, 0x0d, 0x45, 0xd2, 0x78, 0xda,
|
||||
0x1c, 0xdf, 0xc8, 0xd0, 0xac, 0x4a, 0x9a, 0x46, 0x1e, 0x4d, 0xe5, 0x39, 0xc3, 0xf3, 0x59, 0xc2,
|
||||
0x73, 0x87, 0x06, 0xd4, 0x93, 0xb2, 0x93, 0x97, 0xd6, 0x55, 0x67, 0x53, 0x97, 0x6c, 0xcb, 0x71,
|
||||
0xd2, 0x92, 0xa5, 0x58, 0x49, 0xc9, 0x72, 0x5b, 0xa2, 0x7a, 0x7a, 0x57, 0xe2, 0x07, 0x04, 0xf5,
|
||||
0xa2, 0x08, 0x75, 0x29, 0xee, 0x0d, 0xcf, 0x82, 0x7e, 0x29, 0x16, 0x92, 0xec, 0xed, 0x50, 0xe7,
|
||||
0x26, 0xf3, 0xc3, 0xed, 0x8d, 0x7e, 0xc6, 0x1f, 0x3d, 0x6b, 0xbc, 0x3e, 0x06, 0x1b, 0x6d, 0xc3,
|
||||
0x07, 0x93, 0xe1, 0x21, 0x02, 0xf3, 0x18, 0x85, 0x4f, 0x98, 0x20, 0xc1, 0x6c, 0x33, 0x6d, 0xfe,
|
||||
0x8d, 0xe0, 0x5a, 0x29, 0x0d, 0x9d, 0x8e, 0x0f, 0x8f, 0xa7, 0xc3, 0xca, 0xed, 0xcc, 0x01, 0xca,
|
||||
0x4e, 0xe2, 0x49, 0x21, 0x1d, 0x1b, 0x8c, 0xf8, 0x2e, 0x9c, 0x15, 0x7d, 0x3f, 0xb5, 0xea, 0x29,
|
||||
0x26, 0x57, 0x41, 0x0e, 0x86, 0x6e, 0xca, 0x21, 0xbd, 0x30, 0x33, 0xcb, 0x6b, 0xac, 0x87, 0x6e,
|
||||
0x2e, 0x05, 0x9d, 0xd3, 0x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xe8, 0x4d, 0x36, 0x36, 0x26, 0xb2, 0x49, 0xfd, 0xff, 0x86, 0xe0, 0xa5, 0xfc, 0xd9,
|
||||
0x8f, 0xdf, 0x1e, 0x07, 0x31, 0xe7, 0xd1, 0x32, 0xde, 0x99, 0xdc, 0x30, 0xd3, 0x13, 0x39, 0x43,
|
||||
0xb3, 0xac, 0x27, 0x8a, 0xc7, 0x7c, 0x59, 0x4f, 0x94, 0x4c, 0x66, 0xb3, 0x82, 0xff, 0x40, 0x50,
|
||||
0x2b, 0x1a, 0x5d, 0x78, 0x73, 0x0c, 0xd4, 0xfc, 0xb9, 0x6b, 0xdc, 0x98, 0xc6, 0x34, 0x65, 0x15,
|
||||
0xc1, 0xc5, 0xcc, 0xac, 0xc2, 0x56, 0x31, 0x5c, 0xde, 0xc4, 0x33, 0xec, 0xb1, 0xf5, 0x13, 0x9f,
|
||||
0xdb, 0x1f, 0x3c, 0x3e, 0xac, 0xa3, 0x27, 0x87, 0x75, 0xf4, 0xef, 0x61, 0x1d, 0xfd, 0x7e, 0x54,
|
||||
0xaf, 0x3c, 0x39, 0xaa, 0x57, 0xfe, 0x39, 0xaa, 0x57, 0xee, 0xae, 0x95, 0x4e, 0xbe, 0xaf, 0xb3,
|
||||
0x9f, 0xa3, 0x72, 0x10, 0xee, 0xce, 0xcb, 0x0f, 0xd1, 0x8d, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff,
|
||||
0x6d, 0x56, 0x99, 0x70, 0x32, 0x0f, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -1551,9 +1551,9 @@ func (m *QueryValidatorSlashesRequest) MarshalToSizedBuffer(dAtA []byte) (int, e
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1603,9 +1603,9 @@ func (m *QueryValidatorSlashesResponse) MarshalToSizedBuffer(dAtA []byte) (int,
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -2064,8 +2064,8 @@ func (m *QueryValidatorSlashesRequest) Size() (n int) {
|
|||
if m.EndingHeight != 0 {
|
||||
n += 1 + sovQuery(uint64(m.EndingHeight))
|
||||
}
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -2083,8 +2083,8 @@ func (m *QueryValidatorSlashesResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -2828,7 +2828,7 @@ func (m *QueryValidatorSlashesRequest) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -2855,10 +2855,10 @@ func (m *QueryValidatorSlashesRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -2951,7 +2951,7 @@ func (m *QueryValidatorSlashesResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -2978,10 +2978,10 @@ func (m *QueryValidatorSlashesResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
|
|
@ -94,7 +94,7 @@ func queryAllEvidence(clientCtx client.Context, pageReq *query.PageRequest) erro
|
|||
queryClient := types.NewQueryClient(clientCtx)
|
||||
|
||||
params := &types.QueryAllEvidenceRequest{
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
}
|
||||
|
||||
res, err := queryClient.AllEvidence(context.Background(), params)
|
||||
|
|
|
@ -61,7 +61,7 @@ func (k Keeper) AllEvidence(c context.Context, req *types.QueryAllEvidenceReques
|
|||
store := ctx.KVStore(k.storeKey)
|
||||
evidenceStore := prefix.NewStore(store, types.KeyPrefixEvidence)
|
||||
|
||||
res, err := query.Paginate(evidenceStore, req.Req, func(key []byte, value []byte) error {
|
||||
pageRes, err := query.Paginate(evidenceStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
result, err := k.UnmarshalEvidence(value)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -84,5 +84,5 @@ func (k Keeper) AllEvidence(c context.Context, req *types.QueryAllEvidenceReques
|
|||
return &types.QueryAllEvidenceResponse{}, err
|
||||
}
|
||||
|
||||
return &types.QueryAllEvidenceResponse{Evidence: evidence, Res: res}, nil
|
||||
return &types.QueryAllEvidenceResponse{Evidence: evidence, Pagination: pageRes}, nil
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ func (suite *KeeperTestSuite) TestQueryAllEvidence() {
|
|||
true,
|
||||
func(res *types.QueryAllEvidenceResponse) {
|
||||
suite.Equal(len(res.Evidence), 50)
|
||||
suite.NotNil(res.Res.NextKey)
|
||||
suite.NotNil(res.Pagination.NextKey)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ func NewQueryEvidenceRequest(hash tmbytes.HexBytes) *QueryEvidenceRequest {
|
|||
}
|
||||
|
||||
// NewQueryAllEvidenceRequest creates a new instance of QueryAllEvidenceRequest.
|
||||
func NewQueryAllEvidenceRequest(req *query.PageRequest) *QueryAllEvidenceRequest {
|
||||
return &QueryAllEvidenceRequest{Req: req}
|
||||
func NewQueryAllEvidenceRequest(pageReq *query.PageRequest) *QueryAllEvidenceRequest {
|
||||
return &QueryAllEvidenceRequest{Pagination: pageReq}
|
||||
}
|
||||
|
||||
// QueryAllEvidenceParams defines the parameters necessary for querying for all Evidence.
|
||||
|
|
|
@ -123,7 +123,7 @@ func (m *QueryEvidenceResponse) GetEvidence() *types.Any {
|
|||
|
||||
// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC method
|
||||
type QueryAllEvidenceRequest struct {
|
||||
Req *query.PageRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryAllEvidenceRequest) Reset() { *m = QueryAllEvidenceRequest{} }
|
||||
|
@ -159,17 +159,17 @@ func (m *QueryAllEvidenceRequest) XXX_DiscardUnknown() {
|
|||
|
||||
var xxx_messageInfo_QueryAllEvidenceRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryAllEvidenceRequest) GetReq() *query.PageRequest {
|
||||
func (m *QueryAllEvidenceRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC method
|
||||
type QueryAllEvidenceResponse struct {
|
||||
Evidence []*types.Any `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"`
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Evidence []*types.Any `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryAllEvidenceResponse) Reset() { *m = QueryAllEvidenceResponse{} }
|
||||
|
@ -212,9 +212,9 @@ func (m *QueryAllEvidenceResponse) GetEvidence() []*types.Any {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryAllEvidenceResponse) GetRes() *query.PageResponse {
|
||||
func (m *QueryAllEvidenceResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -229,32 +229,33 @@ func init() {
|
|||
func init() { proto.RegisterFile("cosmos/evidence/query.proto", fileDescriptor_6afffc78347cbc5e) }
|
||||
|
||||
var fileDescriptor_6afffc78347cbc5e = []byte{
|
||||
// 400 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x6a, 0xdb, 0x30,
|
||||
0x18, 0xc7, 0xed, 0x85, 0x8d, 0xa0, 0x64, 0x0c, 0x44, 0xc6, 0x12, 0x8f, 0x79, 0xc3, 0xb0, 0x91,
|
||||
0xb1, 0x45, 0x1a, 0x59, 0x0f, 0xbd, 0x26, 0xd0, 0x36, 0xbd, 0xb5, 0x3e, 0xb6, 0x94, 0x62, 0xc7,
|
||||
0xaa, 0x6d, 0xea, 0x48, 0x8e, 0x25, 0x97, 0xb8, 0x4f, 0xd1, 0xc7, 0x2a, 0x3d, 0xe5, 0xd8, 0x53,
|
||||
0x29, 0xc9, 0x5b, 0xf4, 0x54, 0x2c, 0x5b, 0x6d, 0x48, 0x0c, 0xe9, 0x29, 0x5f, 0xac, 0x9f, 0xff,
|
||||
0xbf, 0x4f, 0x9f, 0x64, 0xf0, 0x75, 0xcc, 0xf8, 0x84, 0x71, 0x4c, 0xae, 0x42, 0x8f, 0xd0, 0x31,
|
||||
0xc1, 0xd3, 0x94, 0x24, 0x19, 0x8a, 0x13, 0x26, 0x18, 0xfc, 0x54, 0x2c, 0x22, 0xb5, 0x68, 0x7c,
|
||||
0x2b, 0x69, 0x09, 0xe1, 0xd8, 0xf1, 0x43, 0xea, 0x88, 0x90, 0xd1, 0x82, 0x37, 0x5a, 0x3e, 0xf3,
|
||||
0x99, 0x2c, 0x71, 0x5e, 0x95, 0x4f, 0x3b, 0x3e, 0x63, 0x7e, 0x44, 0xb0, 0xfc, 0xe7, 0xa6, 0x17,
|
||||
0xd8, 0xa1, 0xa5, 0xc0, 0x4a, 0x41, 0xeb, 0x38, 0x8f, 0xda, 0x2b, 0x05, 0x36, 0x99, 0xa6, 0x84,
|
||||
0x0b, 0x78, 0x06, 0x3e, 0x2a, 0xe7, 0x79, 0xe0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db, 0x85, 0xa9, 0xcf, 0x17, 0xa6, 0xfe, 0xb8, 0x30, 0xf5,
|
||||
0x9b, 0xa5, 0xa9, 0xcd, 0x97, 0xa6, 0x76, 0xbf, 0x34, 0xb5, 0x93, 0xde, 0xca, 0xcd, 0x29, 0xef,
|
||||
0x71, 0xf1, 0xd3, 0xe3, 0xde, 0x25, 0x9e, 0xbd, 0x7e, 0x02, 0x22, 0x8b, 0x09, 0x77, 0x3f, 0xc8,
|
||||
0xd9, 0xfe, 0x7f, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xbc, 0xe1, 0xb4, 0x22, 0x03, 0x00, 0x00,
|
||||
// 402 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x41, 0x4f, 0xdb, 0x30,
|
||||
0x1c, 0xc5, 0x93, 0x4d, 0x9b, 0x2a, 0xb7, 0xd3, 0x24, 0xab, 0xd3, 0xda, 0x4c, 0xcb, 0xa6, 0x48,
|
||||
0x9b, 0xba, 0x43, 0xed, 0xa9, 0x70, 0x00, 0x6e, 0xad, 0x84, 0x28, 0x37, 0x88, 0x38, 0x81, 0x10,
|
||||
0x4a, 0x1a, 0x93, 0x44, 0xa4, 0x76, 0x5a, 0x3b, 0xa8, 0xf9, 0x06, 0x1c, 0xf9, 0x58, 0x88, 0x53,
|
||||
0x8f, 0x9c, 0x10, 0x6a, 0xbf, 0x05, 0x27, 0x54, 0x27, 0xa6, 0xa1, 0x8d, 0x54, 0x4e, 0xf9, 0x27,
|
||||
0x7e, 0x79, 0xef, 0xe7, 0x17, 0x07, 0xfc, 0x18, 0x30, 0x3e, 0x64, 0x1c, 0x93, 0xeb, 0xd0, 0x23,
|
||||
0x74, 0x40, 0xf0, 0x28, 0x21, 0xe3, 0x14, 0xc5, 0x63, 0x26, 0x18, 0xfc, 0x9a, 0x2d, 0x22, 0xb5,
|
||||
0x68, 0xfc, 0xcc, 0xd5, 0x52, 0x84, 0x63, 0xc7, 0x0f, 0xa9, 0x23, 0x42, 0x46, 0x33, 0xbd, 0x51,
|
||||
0xf7, 0x99, 0xcf, 0xe4, 0x88, 0x17, 0x53, 0xfe, 0xb4, 0xe9, 0x33, 0xe6, 0x47, 0x04, 0xcb, 0x3b,
|
||||
0x37, 0xb9, 0xc4, 0x0e, 0xcd, 0x03, 0xac, 0x04, 0xd4, 0x8f, 0x17, 0x56, 0xfb, 0x79, 0x80, 0x4d,
|
||||
0x46, 0x09, 0xe1, 0x02, 0x9e, 0x83, 0x2f, 0x2a, 0xf3, 0x22, 0x70, 0x78, 0xd0, 0xd0, 0x7f, 0xeb,
|
||||
0xad, 0x5a, 0x6f, 0xe7, 0xf9, 0xf1, 0xd7, 0xb6, 0x1f, 0x8a, 0x20, 0x71, 0xd1, 0x80, 0x0d, 0xb1,
|
||||
0x20, 0xd4, 0x23, 0xe3, 0x61, 0x48, 0x45, 0x71, 0x8c, 0x42, 0x97, 0x63, 0x37, 0x15, 0x84, 0xa3,
|
||||
0x3e, 0x99, 0xf4, 0x16, 0x83, 0x5d, 0x53, 0x76, 0x7d, 0x87, 0x07, 0xd6, 0x21, 0xf8, 0xb6, 0x12,
|
||||
0xcb, 0x63, 0x46, 0x39, 0x81, 0xff, 0x41, 0x45, 0x09, 0x65, 0x64, 0xb5, 0x53, 0x47, 0x19, 0x3d,
|
||||
0x52, 0xf4, 0xa8, 0x4b, 0x53, 0xfb, 0x55, 0x65, 0x9d, 0x80, 0xef, 0xd2, 0xaa, 0x1b, 0x45, 0xab,
|
||||
0x9b, 0xd8, 0x05, 0x60, 0xd9, 0x50, 0x6e, 0xd7, 0x44, 0x79, 0xa5, 0x59, 0xcd, 0x47, 0x8e, 0xaf,
|
||||
0xe4, 0x76, 0x41, 0x6c, 0xdd, 0xe8, 0xa0, 0xb1, 0x6e, 0x5b, 0x0a, 0xf9, 0x71, 0x33, 0x24, 0xdc,
|
||||
0x7b, 0x43, 0xf2, 0x41, 0x92, 0x18, 0x65, 0x24, 0x59, 0x42, 0x11, 0xa5, 0x73, 0xaf, 0x83, 0x4f,
|
||||
0x12, 0x05, 0x9e, 0x81, 0x8a, 0x62, 0x81, 0x7f, 0xd0, 0xca, 0xd1, 0x40, 0x65, 0xdf, 0xd1, 0xf8,
|
||||
0xbb, 0x49, 0x96, 0x05, 0x5a, 0x1a, 0xf4, 0x40, 0xb5, 0xb0, 0x57, 0xd8, 0x2a, 0x7f, 0x71, 0xbd,
|
||||
0x65, 0xe3, 0xdf, 0x3b, 0x94, 0x2a, 0xa5, 0x77, 0x70, 0x37, 0x33, 0xf5, 0xe9, 0xcc, 0xd4, 0x9f,
|
||||
0x66, 0xa6, 0x7e, 0x3b, 0x37, 0xb5, 0xe9, 0xdc, 0xd4, 0x1e, 0xe6, 0xa6, 0x76, 0xda, 0x2e, 0x1c,
|
||||
0xab, 0xfc, 0x90, 0x67, 0x97, 0x36, 0xf7, 0xae, 0xf0, 0x64, 0xf9, 0x7f, 0x88, 0x34, 0x26, 0xdc,
|
||||
0xfd, 0x2c, 0x9b, 0xde, 0x7a, 0x09, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x1c, 0xab, 0xe8, 0x3f, 0x03,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -462,9 +463,9 @@ func (m *QueryAllEvidenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -497,9 +498,9 @@ func (m *QueryAllEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -569,8 +570,8 @@ func (m *QueryAllEvidenceRequest) Size() (n int) {
|
|||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -588,8 +589,8 @@ func (m *QueryAllEvidenceResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -808,7 +809,7 @@ func (m *QueryAllEvidenceRequest) Unmarshal(dAtA []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -835,10 +836,10 @@ func (m *QueryAllEvidenceRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -931,7 +932,7 @@ func (m *QueryAllEvidenceResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -958,10 +959,10 @@ func (m *QueryAllEvidenceResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
|
|
@ -144,7 +144,7 @@ $ %s query gov proposals --page=2 --limit=100
|
|||
ProposalStatus: proposalStatus,
|
||||
Voter: voterAddr,
|
||||
Depositor: depositorAddr,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
@ -303,7 +303,7 @@ $ %[1]s query gov votes 1 --page=2 --limit=100
|
|||
|
||||
res, err := queryClient.Votes(
|
||||
context.Background(),
|
||||
&types.QueryVotesRequest{ProposalId: proposalID, Req: pageReq},
|
||||
&types.QueryVotesRequest{ProposalId: proposalID, Pagination: pageReq},
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -450,7 +450,7 @@ $ %s query gov deposits 1
|
|||
|
||||
res, err := queryClient.Deposits(
|
||||
context.Background(),
|
||||
&types.QueryDepositsRequest{ProposalId: proposalID, Req: pageReq},
|
||||
&types.QueryDepositsRequest{ProposalId: proposalID, Pagination: pageReq},
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -42,7 +42,7 @@ func (q Keeper) Proposals(c context.Context, req *types.QueryProposalsRequest) (
|
|||
store := ctx.KVStore(q.storeKey)
|
||||
proposalStore := prefix.NewStore(store, types.ProposalsKeyPrefix)
|
||||
|
||||
res, err := query.FilteredPaginate(proposalStore, req.Req, func(key []byte, value []byte, accumulate bool) (bool, error) {
|
||||
pageRes, err := query.FilteredPaginate(proposalStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) {
|
||||
var p types.Proposal
|
||||
if err := q.cdc.UnmarshalBinaryBare(value, &p); err != nil {
|
||||
return false, status.Error(codes.Internal, err.Error())
|
||||
|
@ -80,7 +80,7 @@ func (q Keeper) Proposals(c context.Context, req *types.QueryProposalsRequest) (
|
|||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return &types.QueryProposalsResponse{Proposals: filteredProposals, Res: res}, nil
|
||||
return &types.QueryProposalsResponse{Proposals: filteredProposals, Pagination: pageRes}, nil
|
||||
}
|
||||
|
||||
// Vote returns Voted information based on proposalID, voterAddr
|
||||
|
@ -124,7 +124,7 @@ func (q Keeper) Votes(c context.Context, req *types.QueryVotesRequest) (*types.Q
|
|||
store := ctx.KVStore(q.storeKey)
|
||||
votesStore := prefix.NewStore(store, types.VotesKey(req.ProposalId))
|
||||
|
||||
res, err := query.Paginate(votesStore, req.Req, func(key []byte, value []byte) error {
|
||||
pageRes, err := query.Paginate(votesStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
var vote types.Vote
|
||||
if err := q.cdc.UnmarshalBinaryBare(value, &vote); err != nil {
|
||||
return err
|
||||
|
@ -138,7 +138,7 @@ func (q Keeper) Votes(c context.Context, req *types.QueryVotesRequest) (*types.Q
|
|||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return &types.QueryVotesResponse{Votes: votes, Res: res}, nil
|
||||
return &types.QueryVotesResponse{Votes: votes, Pagination: pageRes}, nil
|
||||
}
|
||||
|
||||
// Params queries all params
|
||||
|
@ -209,7 +209,7 @@ func (q Keeper) Deposits(c context.Context, req *types.QueryDepositsRequest) (*t
|
|||
store := ctx.KVStore(q.storeKey)
|
||||
depositStore := prefix.NewStore(store, types.DepositsKey(req.ProposalId))
|
||||
|
||||
res, err := query.Paginate(depositStore, req.Req, func(key []byte, value []byte) error {
|
||||
pageRes, err := query.Paginate(depositStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
var deposit types.Deposit
|
||||
if err := q.cdc.UnmarshalBinaryBare(value, &deposit); err != nil {
|
||||
return err
|
||||
|
@ -223,7 +223,7 @@ func (q Keeper) Deposits(c context.Context, req *types.QueryDepositsRequest) (*t
|
|||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return &types.QueryDepositsResponse{Deposits: deposits, Res: res}, nil
|
||||
return &types.QueryDepositsResponse{Deposits: deposits, Pagination: pageRes}, nil
|
||||
}
|
||||
|
||||
// TallyResult queries the tally of a proposal vote
|
||||
|
|
|
@ -113,7 +113,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() {
|
|||
}
|
||||
|
||||
req = &types.QueryProposalsRequest{
|
||||
Req: &query.PageRequest{Limit: 3},
|
||||
Pagination: &query.PageRequest{Limit: 3},
|
||||
}
|
||||
|
||||
expRes = &types.QueryProposalsResponse{
|
||||
|
@ -126,7 +126,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() {
|
|||
"request 2nd page with limit 4",
|
||||
func() {
|
||||
req = &types.QueryProposalsRequest{
|
||||
Req: &query.PageRequest{Offset: 3, Limit: 3},
|
||||
Pagination: &query.PageRequest{Offset: 3, Limit: 3},
|
||||
}
|
||||
|
||||
expRes = &types.QueryProposalsResponse{
|
||||
|
@ -139,7 +139,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() {
|
|||
"request with limit 2 and count true",
|
||||
func() {
|
||||
req = &types.QueryProposalsRequest{
|
||||
Req: &query.PageRequest{Limit: 2, CountTotal: true},
|
||||
Pagination: &query.PageRequest{Limit: 2, CountTotal: true},
|
||||
}
|
||||
|
||||
expRes = &types.QueryProposalsResponse{
|
||||
|
|
|
@ -7,9 +7,9 @@ import (
|
|||
context "context"
|
||||
fmt "fmt"
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
query "github.com/cosmos/cosmos-sdk/types/query"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
|
@ -128,8 +128,8 @@ type QueryProposalsRequest struct {
|
|||
// Voter address for the proposals.
|
||||
Voter github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=voter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"voter,omitempty"`
|
||||
// Deposit addresses from the proposals.
|
||||
Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"depositor,omitempty"`
|
||||
Req *query.PageRequest `protobuf:"bytes,4,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"depositor,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryProposalsRequest) Reset() { *m = QueryProposalsRequest{} }
|
||||
|
@ -186,17 +186,17 @@ func (m *QueryProposalsRequest) GetDepositor() github_com_cosmos_cosmos_sdk_type
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryProposalsRequest) GetReq() *query.PageRequest {
|
||||
func (m *QueryProposalsRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryProposalsResponse is the response type for the Query/Proposals RPC method
|
||||
type QueryProposalsResponse struct {
|
||||
Proposals []Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals"`
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Proposals []Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryProposalsResponse) Reset() { *m = QueryProposalsResponse{} }
|
||||
|
@ -239,9 +239,9 @@ func (m *QueryProposalsResponse) GetProposals() []Proposal {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryProposalsResponse) GetRes() *query.PageResponse {
|
||||
func (m *QueryProposalsResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ func (m *QueryVoteResponse) GetVote() Vote {
|
|||
type QueryVotesRequest struct {
|
||||
// unique id of the proposal
|
||||
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
|
||||
Req *query.PageRequest `protobuf:"bytes,2,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryVotesRequest) Reset() { *m = QueryVotesRequest{} }
|
||||
|
@ -393,17 +393,17 @@ func (m *QueryVotesRequest) GetProposalId() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (m *QueryVotesRequest) GetReq() *query.PageRequest {
|
||||
func (m *QueryVotesRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryVotesResponse is the response type for the Query/Votes RPC method
|
||||
type QueryVotesResponse struct {
|
||||
Votes []Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes"`
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Votes []Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryVotesResponse) Reset() { *m = QueryVotesResponse{} }
|
||||
|
@ -446,9 +446,9 @@ func (m *QueryVotesResponse) GetVotes() []Vote {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryVotesResponse) GetRes() *query.PageResponse {
|
||||
func (m *QueryVotesResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -663,7 +663,7 @@ func (m *QueryDepositResponse) GetDeposit() Deposit {
|
|||
type QueryDepositsRequest struct {
|
||||
// unique id of the proposal
|
||||
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
|
||||
Req *query.PageRequest `protobuf:"bytes,2,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryDepositsRequest) Reset() { *m = QueryDepositsRequest{} }
|
||||
|
@ -706,17 +706,17 @@ func (m *QueryDepositsRequest) GetProposalId() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (m *QueryDepositsRequest) GetReq() *query.PageRequest {
|
||||
func (m *QueryDepositsRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryDepositsResponse is the response type for the Query/Deposits RPC method
|
||||
type QueryDepositsResponse struct {
|
||||
Deposits []Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"`
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Deposits []Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryDepositsResponse) Reset() { *m = QueryDepositsResponse{} }
|
||||
|
@ -759,9 +759,9 @@ func (m *QueryDepositsResponse) GetDeposits() []Deposit {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryDepositsResponse) GetRes() *query.PageResponse {
|
||||
func (m *QueryDepositsResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -879,58 +879,58 @@ func init() {
|
|||
func init() { proto.RegisterFile("cosmos/gov/query.proto", fileDescriptor_6efb1c1bc2595eda) }
|
||||
|
||||
var fileDescriptor_6efb1c1bc2595eda = []byte{
|
||||
// 807 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4b, 0x4f, 0x13, 0x51,
|
||||
0x14, 0xee, 0xf4, 0x01, 0xed, 0x29, 0x20, 0x5e, 0x10, 0xea, 0x44, 0xda, 0x3a, 0xba, 0x20, 0x0a,
|
||||
0x6d, 0x84, 0xa0, 0xc6, 0x8d, 0x52, 0x7c, 0x86, 0x44, 0x60, 0x24, 0x2e,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, 0x31, 0x6f, 0xd3, 0xc1, 0xaa, 0x3d, 0x9c,
|
||||
0xa8, 0x98, 0x61, 0x34, 0x23, 0x40, 0x40, 0x46, 0xd6, 0x2f, 0x9a, 0x94, 0x1c, 0xa9, 0x49, 0x0e,
|
||||
0xa0, 0xe0, 0x15, 0x42, 0xe4, 0x12, 0xb7, 0x40, 0xf6, 0x26, 0x4e, 0x25, 0x07, 0x5d, 0xb2, 0x27,
|
||||
0x6b, 0xe2, 0xc6, 0x6d, 0xc3, 0x35, 0x0e, 0x43, 0x55, 0xb1, 0xc0, 0xbe, 0xe7, 0x26, 0xab, 0x2a,
|
||||
0xa7, 0x03, 0x0f, 0xed, 0x76, 0x1d, 0x4b, 0xfb, 0xa1, 0xc0, 0x4c, 0x28, 0x4f, 0x48, 0xdd, 0x80,
|
||||
0xc9, 0x0e, 0xa6, 0x8d, 0x96, 0xbd, 0xcf, 0xc1, 0xc2, 0xd8, 0x42, 0x9f, 0xe4, 0x46, 0xcb, 0xe6,
|
||||
0x89, 0x42, 0xfa, 0x44, 0x27, 0x10, 0x43, 0xcf, 0x61, 0x4a, 0x0c, 0xb9, 0x64, 0xe9, 0x73, 0xcf,
|
||||
0x63, 0x79, 0xca, 0x11, 0x21, 0x9a, 0x49, 0x33, 0x18, 0x44, 0x4f, 0x60, 0x82, 0x1a, 0xcd, 0x66,
|
||||
0x57, 0xb2, 0xa4, 0x18, 0xcb, 0x7c, 0x90, 0x65, 0xd7, 0x3b, 0x0f, 0x71, 0xe4, 0x69, 0x2f, 0xa4,
|
||||
0x7d, 0x92, 0x65, 0x8a, 0xdb, 0x46, 0xee, 0x7a, 0xe8, 0xad, 0x27, 0xff, 0xfe, 0xad, 0x6b, 0x9b,
|
||||
0x62, 0xdd, 0xfa, 0x42, 0x84, 0xe1, 0xab, 0x30, 0x2e, 0x40, 0xc2, 0xea, 0x99, 0x01, 0x26, 0x89,
|
||||
0xd2, 0x24, 0x52, 0x33, 0xc3, 0x64, 0xff, 0x69, 0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, 0x9c, 0xe8, 0x64, 0xab, 0xb7, 0x87, 0x83, 0x24, 0x77,
|
||||
0xad, 0x76, 0x72, 0x5e, 0x54, 0x4e, 0xcf, 0x8b, 0xca, 0xf7, 0xf3, 0xa2, 0xf2, 0xe5, 0xa2, 0x98,
|
||||
0x38, 0xbd, 0x28, 0x26, 0xbe, 0x5d, 0x14, 0x13, 0x7b, 0x8b, 0x43, 0x37, 0xd4, 0x07, 0xf6, 0x23,
|
||||
0x90, 0xed, 0xa9, 0x83, 0x31, 0xf6, 0x3b, 0x70, 0xf5, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4f,
|
||||
0xc2, 0x0e, 0x6f, 0x78, 0x0a, 0x00, 0x00,
|
||||
// 808 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdf, 0x4f, 0xd3, 0x50,
|
||||
0x14, 0x5e, 0xc7, 0x06, 0xdb, 0x19, 0x20, 0x5e, 0x10, 0x66, 0x23, 0xdb, 0xac, 0x3e, 0x10, 0x23,
|
||||
0x5b, 0x84, 0xa0, 0xc2, 0x8b, 0x32, 0xfc, 0x19, 0x12, 0x81, 0x49, 0x7c, 0xe0, 0x85, 0x94, 0xb5,
|
||||
0xa9, 0x8d, 0x63, 0xb7, 0xf4, 0xde, 0x2d, 0x2e, 0x31, 0xbe, 0x9a, 0x98, 0x68, 0xfc, 0x57, 0xfc,
|
||||
0x2f, 0x78, 0xe4, 0xd1, 0x27, 0x62, 0xc0, 0xbf, 0xc2, 0x27, 0xd3, 0xfb, 0xa3, 0x6b, 0xd7, 0x75,
|
||||
0x4e, 0x31, 0x3e, 0x31, 0xce, 0xfd, 0xce, 0x77, 0xbf, 0xf3, 0x9d, 0xd3, 0xd3, 0xc2, 0x6c, 0x1d,
|
||||
0x93, 0x43, 0x4c, 0x2a, 0x16, 0x6e, 0x57, 0x8e, 0x5a, 0xa6, 0xdb, 0x29, 0x3b, 0x2e, 0xa6, 0x18,
|
||||
0x01, 0x8f, 0x97, 0x2d, 0xdc, 0x56, 0xe7, 0x05, 0x86, 0x9d, 0x57, 0x1c, 0xdd, 0xb2, 0x9b, 0x3a,
|
||||
0xb5, 0x71, 0x93, 0x43, 0xd5, 0x19, 0x0b, 0x5b, 0x98, 0xfd, 0xac, 0x78, 0xbf, 0x64, 0x34, 0x40,
|
||||
0x6c, 0xe1, 0x36, 0x8f, 0x6a, 0xf7, 0x60, 0x66, 0xc7, 0x63, 0xd9, 0x76, 0xb1, 0x83, 0x89, 0xde,
|
||||
0xa8, 0x99, 0x47, 0x2d, 0x93, 0x50, 0x54, 0x84, 0x9c, 0x23, 0x42, 0xfb, 0xb6, 0x91, 0x57, 0x4a,
|
||||
0xca, 0x42, 0xaa, 0x06, 0x32, 0xf4, 0xdc, 0xd0, 0xb6, 0xe0, 0x4a, 0x4f, 0x22, 0x71, 0x70, 0x93,
|
||||
0x98, 0xe8, 0x2e, 0x64, 0x24, 0x8c, 0xa5, 0xe5, 0x96, 0x66, 0xca, 0x5d, 0xed, 0x65, 0x89, 0xaf,
|
||||
0xa6, 0x8e, 0x4f, 0x8b, 0x89, 0x9a, 0x8f, 0xd5, 0xbe, 0x26, 0x7b, 0x18, 0x89, 0xd4, 0xb2, 0x01,
|
||||
0x97, 0x7c, 0x2d, 0x84, 0xea, 0xb4, 0x45, 0x18, 0xf1, 0xe4, 0x92, 0xda, 0x8f, 0xf8, 0x25, 0x43,
|
||||
0xd4, 0x26, 0x9d, 0xd0, 0xff, 0xe8, 0x29, 0xa4, 0xdb, 0x98, 0x9a, 0x6e, 0x3e, 0x59, 0x52, 0x16,
|
||||
0xc6, 0xab, 0x77, 0x7e, 0x9e, 0x16, 0x17, 0x2d, 0x9b, 0xbe, 0x6e, 0x1d, 0x94, 0xeb, 0xf8, 0xb0,
|
||||
0x22, 0xcc, 0xe1, 0x7f, 0x16, 0x89, 0xf1, 0xa6, 0x42, 0x3b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 0x32, 0x72, 0x2b, 0xa3, 0x52, 0x30, 0xb7, 0xdf, 0x1b, 0x5a,
|
||||
0xbd, 0x3e, 0x00, 0xc1, 0xf5, 0x68, 0x09, 0xb4, 0x0b, 0x59, 0xff, 0xd5, 0x80, 0xe2, 0x33, 0xe4,
|
||||
0x08, 0xa8, 0xda, 0x20, 0x88, 0xcf, 0xfa, 0x18, 0x52, 0xde, 0x1a, 0x42, 0xd7, 0x22, 0xe8, 0xc0,
|
||||
0xde, 0x57, 0xe7, 0x63, 0x4e, 0x7d, 0x9a, 0x67, 0x90, 0x66, 0x7b, 0x0f, 0xf5, 0x47, 0xfa, 0xa2,
|
||||
0x0a, 0x71, 0xc7, 0x3e, 0xd3, 0x26, 0x8c, 0x8a, 0x87, 0x3e, 0x8a, 0x0d, 0xad, 0x36, 0xb5, 0x18,
|
||||
0x7b, 0xee, 0x93, 0xbd, 0x80, 0x31, 0x31, 0x74, 0x28, 0x8a, 0x0e, 0x6f, 0x02, 0xb5, 0x14, 0x0f,
|
||||
0xf0, 0xf9, 0x76, 0x20, 0x23, 0x87, 0x1e, 0xc5, 0xe2, 0x49, 0x7c, 0x5b, 0x7b, 0x9f, 0x18, 0x2d,
|
||||
0x81, 0xf6, 0x20, 0x17, 0x98, 0x27, 0x74, 0x23, 0x92, 0x13, 0x9d, 0x6c, 0xf5, 0xe6, 0x60, 0x90,
|
||||
0xe4, 0xae, 0x56, 0x8f, 0xcf, 0x0a, 0xca, 0xc9, 0x59, 0x41, 0xf9, 0x7e, 0x56, 0x50, 0xbe, 0x9c,
|
||||
0x17, 0x12, 0x27, 0xe7, 0x85, 0xc4, 0xb7, 0xf3, 0x42, 0x62, 0x6f, 0x61, 0xe0, 0xfa, 0x7a, 0xcb,
|
||||
0xbe, 0x2c, 0xd9, 0x12, 0x3b, 0x18, 0x65, 0x1f, 0x97, 0xcb, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff,
|
||||
0x93, 0x13, 0x79, 0x06, 0xcd, 0x0a, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -1362,9 +1362,9 @@ func (m *QueryProposalsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1416,9 +1416,9 @@ func (m *QueryProposalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1533,9 +1533,9 @@ func (m *QueryVotesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1573,9 +1573,9 @@ func (m *QueryVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1773,9 +1773,9 @@ func (m *QueryDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1813,9 +1813,9 @@ func (m *QueryDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1954,8 +1954,8 @@ func (m *QueryProposalsRequest) Size() (n int) {
|
|||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -1973,8 +1973,8 @@ func (m *QueryProposalsResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -2016,8 +2016,8 @@ func (m *QueryVotesRequest) Size() (n int) {
|
|||
if m.ProposalId != 0 {
|
||||
n += 1 + sovQuery(uint64(m.ProposalId))
|
||||
}
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -2035,8 +2035,8 @@ func (m *QueryVotesResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -2106,8 +2106,8 @@ func (m *QueryDepositsRequest) Size() (n int) {
|
|||
if m.ProposalId != 0 {
|
||||
n += 1 + sovQuery(uint64(m.ProposalId))
|
||||
}
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -2125,8 +2125,8 @@ func (m *QueryDepositsResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -2437,7 +2437,7 @@ func (m *QueryProposalsRequest) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -2464,10 +2464,10 @@ func (m *QueryProposalsRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -2560,7 +2560,7 @@ func (m *QueryProposalsResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -2587,10 +2587,10 @@ func (m *QueryProposalsResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -2860,7 +2860,7 @@ func (m *QueryVotesRequest) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -2887,10 +2887,10 @@ func (m *QueryVotesRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -2983,7 +2983,7 @@ func (m *QueryVotesResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -3010,10 +3010,10 @@ func (m *QueryVotesResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -3520,7 +3520,7 @@ func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -3547,10 +3547,10 @@ func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -3643,7 +3643,7 @@ func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -3670,10 +3670,10 @@ func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
|
|
@ -37,7 +37,7 @@ func GetCmdQueryConnections() *cobra.Command {
|
|||
limit, _ := cmd.Flags().GetInt(flags.FlagLimit)
|
||||
|
||||
req := &types.QueryConnectionsRequest{
|
||||
Req: &query.PageRequest{
|
||||
Pagination: &query.PageRequest{
|
||||
Offset: uint64(offset),
|
||||
Limit: uint64(limit),
|
||||
},
|
||||
|
|
|
@ -31,7 +31,7 @@ func queryConnectionsHandlerFn(clientCtx client.Context) http.HandlerFunc {
|
|||
queryClient := types.NewQueryClient(clientCtx)
|
||||
|
||||
req := &types.QueryConnectionsRequest{
|
||||
Req: &query.PageRequest{},
|
||||
Pagination: &query.PageRequest{},
|
||||
}
|
||||
|
||||
res, err := queryClient.Connections(context.Background(), req)
|
||||
|
|
|
@ -52,7 +52,7 @@ func (q Keeper) Connections(c context.Context, req *types.QueryConnectionsReques
|
|||
connections := []*types.ConnectionEnd{}
|
||||
store := prefix.NewStore(ctx.KVStore(q.storeKey), host.KeyConnectionPrefix)
|
||||
|
||||
res, err := query.Paginate(store, req.Req, func(_, value []byte) error {
|
||||
pageRes, err := query.Paginate(store, req.Pagination, func(_, value []byte) error {
|
||||
var result types.ConnectionEnd
|
||||
if err := q.cdc.UnmarshalBinaryBare(value, &result); err != nil {
|
||||
return err
|
||||
|
@ -68,7 +68,7 @@ func (q Keeper) Connections(c context.Context, req *types.QueryConnectionsReques
|
|||
|
||||
return &types.QueryConnectionsResponse{
|
||||
Connections: connections,
|
||||
Res: res,
|
||||
Pagination: pageRes,
|
||||
Height: ctx.BlockHeight(),
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ func (suite *KeeperTestSuite) TestQueryConnections() {
|
|||
expConnections = []*types.ConnectionEnd{&conn1, &conn2, &conn3}
|
||||
|
||||
req = &types.QueryConnectionsRequest{
|
||||
Req: &query.PageRequest{
|
||||
Pagination: &query.PageRequest{
|
||||
Limit: 3,
|
||||
CountTotal: true,
|
||||
},
|
||||
|
|
|
@ -152,7 +152,7 @@ func (m *QueryConnectionResponse) GetProofHeight() uint64 {
|
|||
|
||||
// QueryConnectionsRequest is the request type for the Query/Connections RPC method
|
||||
type QueryConnectionsRequest struct {
|
||||
Req *query.PageRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryConnectionsRequest) Reset() { *m = QueryConnectionsRequest{} }
|
||||
|
@ -188,9 +188,9 @@ func (m *QueryConnectionsRequest) XXX_DiscardUnknown() {
|
|||
|
||||
var xxx_messageInfo_QueryConnectionsRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryConnectionsRequest) GetReq() *query.PageRequest {
|
||||
func (m *QueryConnectionsRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ type QueryConnectionsResponse struct {
|
|||
// list of stored connections of the chain.
|
||||
Connections []*ConnectionEnd `protobuf:"bytes,1,rep,name=connections,proto3" json:"connections,omitempty"`
|
||||
// pagination response
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
// query block height
|
||||
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
|
||||
}
|
||||
|
@ -245,9 +245,9 @@ func (m *QueryConnectionsResponse) GetConnections() []*ConnectionEnd {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryConnectionsResponse) GetRes() *query.PageResponse {
|
||||
func (m *QueryConnectionsResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -392,40 +392,41 @@ func init() {
|
|||
func init() { proto.RegisterFile("ibc/connection/query.proto", fileDescriptor_5ee60d8b08ce3606) }
|
||||
|
||||
var fileDescriptor_5ee60d8b08ce3606 = []byte{
|
||||
// 527 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xc1, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xcd, 0x36, 0x6d, 0xd5, 0x4c, 0x02, 0x94, 0x55, 0x55, 0x8c, 0xa5, 0xb8, 0xc1, 0x07, 0x48,
|
||||
0x05, 0xb1, 0x51, 0x2a, 0xb8, 0x21, 0xa4, 0x52, 0x10, 0xe1, 0x42, 0xd8, 0x23, 0x97, 0x28, 0xb6,
|
||||
0x17, 0xdb, 0x82, 0x7a, 0x9d, 0xec, 0x46, 0xa2, 0x7f, 0xc1, 0x2f, 0x20, 0x7e, 0x80, 0x6f, 0xe0,
|
||||
0xc4, 0xb1, 0x47, 0x4e, 0x15, 0x72, 0x7e, 0x04, 0xed, 0xae, 0xd3, 0x35, 0x4d, 0xaa, 0x70, 0xe1,
|
||||
0x94, 0xdd, 0x9d, 0x37, 0x33, 0xef, 0xbd, 0x89, 0x07, 0xec, 0x34, 0x08, 0xfd, 0x90, 0x65, 0x19,
|
||||
0x0d, 0x45, 0xca, 0x32, 0x7f, 0x32, 0xa3, 0xd3, 0x33, 0x2f, 0x9f, 0x32, 0xc1, 0xf0, 0xcd, 0x34,
|
||||
0x08, 0x3d, 0x13, 0xb3, 0xf7, 0x62, 0x16, 0x33, 0x15, 0xf2, 0xe5, 0x49, 0xa3, 0xec, 0x76, 0xc8,
|
||||
0xf8, 0x29, 0xe3, 0x3a, 0xd3, 0xcf, 0xc7, 0x71, 0x9a, 0x8d, 0x25, 0xbc, 0x0c, 0x1f, 0x5c, 0x69,
|
||||
0x60, 0x8e, 0x1a, 0xe0, 0xbe, 0x85, 0xfd, 0x77, 0x32, 0xf5, 0xc5, 0x65, 0x80, 0xd0, 0xc9, 0x8c,
|
||||
0x72, 0x81, 0x9f, 0xc0, 0x0d, 0x83, 0x1e, 0xa5, 0x91, 0x85, 0x3a, 0xa8, 0xdb, 0x38, 0xde, 0x2d,
|
||||
0x2e, 0x0e, 0x5a, 0x06, 0x3d, 0x38, 0x21, 0x2d, 0x03, 0x1b, 0x44, 0xee, 0x77, 0x04, 0x77, 0x96,
|
||||
0x2a, 0xf2, 0x9c, 0x65, 0x9c, 0xe2, 0x67, 0x00, 0x06, 0xab, 0xea, 0x35, 0xfb, 0x6d, 0xef, 0x6f,
|
||||
0x9d, 0x9e, 0xc9, 0x7b, 0x99, 0x45, 0xa4, 0x92, 0x80, 0xf7, 0x60,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, 0xc4, 0xff, 0xd7, 0x74, 0xfb, 0x3f, 0x36,
|
||||
0x60, 0x4b, 0xb1, 0xc4, 0x23, 0x00, 0xc3, 0x11, 0xdf, 0xbf, 0xea, 0xfd, 0xea, 0xef, 0xc0, 0x7e,
|
||||
0xb0, 0x16, 0xa7, 0xb5, 0xba, 0x35, 0x1c, 0x40, 0xb3, 0x62, 0x02, 0x5e, 0x97, 0xb9, 0xf0, 0xdc,
|
||||
0xee, 0xae, 0x07, 0x5e, 0xf6, 0x10, 0x70, 0x7b, 0xc9, 0x6e, 0xdc, 0x5b, 0x5d, 0xe0, 0x9a, 0x19,
|
||||
0xdb, 0xde, 0xbf, 0xc2, 0x17, 0x5d, 0x8f, 0x87, 0x3f, 0x0b, 0x07, 0x9d, 0x17, 0x0e, 0xfa, 0x5d,
|
||||
0x38, 0xe8, 0xcb, 0xdc, 0xa9, 0x9d, 0xcf, 0x9d, 0xda, 0xaf, 0xb9, 0x53, 0x7b, 0xff, 0x34, 0x4e,
|
||||
0x45, 0x32, 0x0b, 0xbc, 0x90, 0x9d, 0xfa, 0xe5, 0x2e, 0xd2, 0x3f, 0x3d, 0x1e, 0x7d, 0xf4, 0x3f,
|
||||
0xfb, 0x72, 0x01, 0x3d, 0x3e, 0xea, 0x55, 0x76, 0x90, 0x38, 0xcb, 0x29, 0x0f, 0xb6, 0xd5, 0xfe,
|
||||
0x39, 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x7d, 0x4e, 0xc5, 0x03, 0x05, 0x00, 0x00,
|
||||
// 529 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcf, 0x6e, 0xd3, 0x4e,
|
||||
0x10, 0xce, 0x26, 0x6d, 0xd5, 0x4c, 0xfc, 0xfb, 0x51, 0x56, 0x55, 0x31, 0x96, 0xe2, 0x04, 0x1f,
|
||||
0x20, 0x3d, 0xc4, 0x46, 0xad, 0x40, 0x02, 0x09, 0x21, 0x95, 0x22, 0x11, 0x2e, 0x84, 0x15, 0x27,
|
||||
0x2e, 0x91, 0xff, 0x2c, 0xb6, 0x05, 0xf5, 0xba, 0xd9, 0x8d, 0x44, 0xdf, 0x82, 0x77, 0xe0, 0x01,
|
||||
0xe0, 0x19, 0x38, 0x71, 0xec, 0x91, 0x53, 0x85, 0x9c, 0x17, 0x41, 0xde, 0x75, 0xba, 0x6e, 0x93,
|
||||
0x2a, 0x5c, 0x38, 0x65, 0x3d, 0xf3, 0x7d, 0x33, 0xdf, 0x7e, 0xb3, 0x19, 0xb0, 0xd2, 0x20, 0xf4,
|
||||
0x42, 0x96, 0x65, 0x34, 0x14, 0x29, 0xcb, 0xbc, 0xd3, 0x19, 0x9d, 0x9e, 0xb9, 0xf9, 0x94, 0x09,
|
||||
0x86, 0xff, 0x4f, 0x83, 0xd0, 0xd5, 0x39, 0x6b, 0x37, 0x66, 0x31, 0x93, 0x29, 0xaf, 0x3c, 0x29,
|
||||
0x94, 0xd5, 0x0d, 0x19, 0x3f, 0x61, 0x5c, 0x31, 0xbd, 0xdc, 0x8f, 0xd3, 0xcc, 0x2f, 0xe1, 0x55,
|
||||
0xba, 0x77, 0xad, 0x81, 0x3e, 0x2a, 0x80, 0xf3, 0x06, 0xf6, 0xde, 0x96, 0xd4, 0x17, 0x97, 0x09,
|
||||
0x42, 0x4f, 0x67, 0x94, 0x0b, 0xfc, 0x08, 0xfe, 0xd3, 0xe8, 0x49, 0x1a, 0x99, 0xa8, 0x8f, 0x06,
|
||||
0xed, 0xa3, 0x9d, 0xe2, 0xa2, 0x67, 0x68, 0xf4, 0xe8, 0x98, 0x18, 0x1a, 0x36, 0x8a, 0x9c, 0xef,
|
||||
0x08, 0xee, 0x2c, 0x55, 0xe4, 0x39, 0xcb, 0x38, 0xc5, 0xcf, 0x00, 0x34, 0x56, 0xd6, 0xeb, 0x1c,
|
||||
0x74, 0xdd, 0xab, 0xf7, 0x74, 0x35, 0xef, 0x65, 0x16, 0x91, 0x1a, 0x01, 0xef, 0xc2, 0x66, 0x3e,
|
||||
0x65, 0xec, 0x83, 0xd9, 0xec, 0xa3, 0x81, 0x41, 0xd4, 0x07, 0xee, 0x02, 0xc8, 0xc3, 0x24, 0xf7,
|
||||
0x45, 0x62, 0xb6, 0x4a, 0x91, 0xa4, 0x2d, 0x23, 0x63, 0x5f, 0x24, 0xf8, 0x1e, 0x18, 0x2a, 0x9d,
|
||||
0xd0, 0x34, 0x4e, 0x84, 0xb9, 0xd1, 0x47, 0x83, 0x0d, 0xd2, 0x91, 0xb1, 0x57, 0x32, 0xe4, 0xbc,
|
||||
0x5b, 0x52, 0xcc, 0x17, 0x26, 0x3c, 0x01, 0xd0, 0x9e, 0x56, 0x8a, 0xef, 0xba, 0xca, 0x73, 0x57,
|
||||
0x4d, 0x6b, 0xec, 0xc7, 0xb4, 0x82, 0x93, 0x1a, 0xd8, 0xf9, 0x86, 0xc0, 0x5c, 0x2e, 0x5b, 0x39,
|
||||
0xf1, 0x1c, 0x3a, 0xfa, 0x62, 0xdc, 0x44, 0xfd, 0xd6, 0x7a, 0x2b, 0xea, 0x0c, 0xfc, 0xf4, 0x8a,
|
||||
0xb0, 0xa6, 0x14, 0x66, 0xad, 0x12, 0xa6, 0x1a, 0xd6, 0x95, 0xe1, 0x3d, 0xd8, 0xaa, 0xcc, 0x28,
|
||||
0xdd, 0x6a, 0x91, 0xea, 0xcb, 0x79, 0x0d, 0x5d, 0x25, 0xf8, 0x53, 0x4a, 0x33, 0xb1, 0xc2, 0x8d,
|
||||
0x7d, 0x68, 0x87, 0x32, 0xa7, 0x9f, 0x83, 0x51, 0x5c, 0xf4, 0xb6, 0x15, 0x61, 0x74, 0x4c, 0xb6,
|
||||
0x55, 0x7a, 0x14, 0x39, 0x5f, 0x11, 0xd8, 0x37, 0x15, 0xab, 0x3c, 0xd8, 0x87, 0x9d, 0xda, 0x03,
|
||||
0x2b, 0xa7, 0xa7, 0x8c, 0x68, 0x93, 0x5b, 0x3a, 0x5e, 0xce, 0x90, 0xff, 0xab, 0xc9, 0x1f, 0xfc,
|
||||
0x68, 0xc2, 0xa6, 0x54, 0x89, 0x27, 0x00, 0x5a, 0x23, 0xbe, 0x7f, 0x7d, 0x12, 0xab, 0xff, 0x23,
|
||||
0xd6, 0x83, 0xb5, 0x38, 0x75, 0x57, 0xa7, 0x81, 0x03, 0xe8, 0xd4, 0x4c, 0xc0, 0xeb, 0x98, 0x0b,
|
||||
0xcf, 0xad, 0xc1, 0x7a, 0xe0, 0x65, 0x0f, 0x01, 0xb7, 0x97, 0xec, 0xc6, 0xc3, 0xd5, 0x05, 0x6e,
|
||||
0x98, 0xb1, 0xe5, 0xfe, 0x2d, 0x7c, 0xd1, 0xf5, 0x68, 0xfc, 0xb3, 0xb0, 0xd1, 0x79, 0x61, 0xa3,
|
||||
0xdf, 0x85, 0x8d, 0xbe, 0xcc, 0xed, 0xc6, 0xf9, 0xdc, 0x6e, 0xfc, 0x9a, 0xdb, 0x8d, 0xf7, 0x8f,
|
||||
0xe3, 0x54, 0x24, 0xb3, 0xc0, 0x0d, 0xd9, 0x89, 0x57, 0xed, 0x29, 0xf5, 0x33, 0xe4, 0xd1, 0x47,
|
||||
0xef, 0xb3, 0x57, 0x2e, 0xa7, 0x87, 0x87, 0xc3, 0xda, 0x7e, 0x12, 0x67, 0x39, 0xe5, 0xc1, 0x96,
|
||||
0xdc, 0x4d, 0x87, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xed, 0x4b, 0x0d, 0x29, 0x1f, 0x05, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -690,9 +691,9 @@ func (m *QueryConnectionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -730,9 +731,9 @@ func (m *QueryConnectionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error
|
|||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -894,8 +895,8 @@ func (m *QueryConnectionsRequest) Size() (n int) {
|
|||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -913,8 +914,8 @@ func (m *QueryConnectionsResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.Height != 0 {
|
||||
|
@ -1258,7 +1259,7 @@ func (m *QueryConnectionsRequest) Unmarshal(dAtA []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -1285,10 +1286,10 @@ func (m *QueryConnectionsRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -1381,7 +1382,7 @@ func (m *QueryConnectionsResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -1408,10 +1409,10 @@ func (m *QueryConnectionsResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
|
|
@ -42,7 +42,7 @@ func GetCmdQueryChannels() *cobra.Command {
|
|||
limit, _ := cmd.Flags().GetInt(flags.FlagLimit)
|
||||
|
||||
req := &types.QueryChannelsRequest{
|
||||
Req: &query.PageRequest{
|
||||
Pagination: &query.PageRequest{
|
||||
Offset: uint64(offset),
|
||||
Limit: uint64(limit),
|
||||
},
|
||||
|
@ -124,7 +124,7 @@ func GetCmdQueryConnectionChannels() *cobra.Command {
|
|||
|
||||
req := &types.QueryConnectionChannelsRequest{
|
||||
Connection: args[0],
|
||||
Req: &query.PageRequest{
|
||||
Pagination: &query.PageRequest{
|
||||
Offset: uint64(offset),
|
||||
Limit: uint64(limit),
|
||||
},
|
||||
|
@ -203,7 +203,7 @@ func GetCmdQueryPacketCommitments() *cobra.Command {
|
|||
req := &types.QueryPacketCommitmentsRequest{
|
||||
PortID: args[0],
|
||||
ChannelID: args[1],
|
||||
Req: &query.PageRequest{
|
||||
Pagination: &query.PageRequest{
|
||||
Offset: uint64(offset),
|
||||
Limit: uint64(limit),
|
||||
},
|
||||
|
|
|
@ -51,7 +51,7 @@ func (q Keeper) Channels(c context.Context, req *types.QueryChannelsRequest) (*t
|
|||
channels := []*types.IdentifiedChannel{}
|
||||
store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.KeyChannelPrefix))
|
||||
|
||||
res, err := query.Paginate(store, req.Req, func(key, value []byte) error {
|
||||
pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error {
|
||||
var result types.Channel
|
||||
if err := q.cdc.UnmarshalBinaryBare(value, &result); err != nil {
|
||||
return err
|
||||
|
@ -72,9 +72,9 @@ func (q Keeper) Channels(c context.Context, req *types.QueryChannelsRequest) (*t
|
|||
}
|
||||
|
||||
return &types.QueryChannelsResponse{
|
||||
Channels: channels,
|
||||
Res: res,
|
||||
Height: ctx.BlockHeight(),
|
||||
Channels: channels,
|
||||
Pagination: pageRes,
|
||||
Height: ctx.BlockHeight(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ func (q Keeper) ConnectionChannels(c context.Context, req *types.QueryConnection
|
|||
channels := []*types.IdentifiedChannel{}
|
||||
store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.KeyChannelPrefix))
|
||||
|
||||
res, err := query.Paginate(store, req.Req, func(key, value []byte) error {
|
||||
pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error {
|
||||
var result types.Channel
|
||||
if err := q.cdc.UnmarshalBinaryBare(value, &result); err != nil {
|
||||
return err
|
||||
|
@ -120,9 +120,9 @@ func (q Keeper) ConnectionChannels(c context.Context, req *types.QueryConnection
|
|||
}
|
||||
|
||||
return &types.QueryConnectionChannelsResponse{
|
||||
Channels: channels,
|
||||
Res: res,
|
||||
Height: ctx.BlockHeight(),
|
||||
Channels: channels,
|
||||
Pagination: pageRes,
|
||||
Height: ctx.BlockHeight(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ func (q Keeper) PacketCommitments(c context.Context, req *types.QueryPacketCommi
|
|||
commitments := []*types.PacketAckCommitment{}
|
||||
store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.PacketCommitmentPrefixPath(req.PortID, req.ChannelID)))
|
||||
|
||||
res, err := query.Paginate(store, req.Req, func(key, value []byte) error {
|
||||
pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error {
|
||||
keySplit := strings.Split(string(key), "/")
|
||||
|
||||
sequence, err := strconv.ParseUint(keySplit[len(keySplit)-1], 10, 64)
|
||||
|
@ -184,7 +184,7 @@ func (q Keeper) PacketCommitments(c context.Context, req *types.QueryPacketCommi
|
|||
|
||||
return &types.QueryPacketCommitmentsResponse{
|
||||
Commitments: commitments,
|
||||
Res: res,
|
||||
Pagination: pageRes,
|
||||
Height: ctx.BlockHeight(),
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ func (suite *KeeperTestSuite) TestQueryChannels() {
|
|||
expChannels = []*types.IdentifiedChannel{&idCh0, &idCh1}
|
||||
|
||||
req = &types.QueryChannelsRequest{
|
||||
Req: &query.PageRequest{
|
||||
Pagination: &query.PageRequest{
|
||||
Key: nil,
|
||||
Limit: 2,
|
||||
CountTotal: true,
|
||||
|
@ -177,7 +177,7 @@ func (suite *KeeperTestSuite) TestQueryChannels() {
|
|||
suite.Require().NoError(err)
|
||||
suite.Require().NotNil(res)
|
||||
suite.Require().Equal(expChannels, res.Channels)
|
||||
suite.Require().Equal(len(expChannels), int(res.Res.Total))
|
||||
suite.Require().Equal(len(expChannels), int(res.Pagination.Total))
|
||||
} else {
|
||||
suite.Require().Error(err)
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionChannels() {
|
|||
|
||||
req = &types.QueryConnectionChannelsRequest{
|
||||
Connection: connB0.ID,
|
||||
Req: &query.PageRequest{
|
||||
Pagination: &query.PageRequest{
|
||||
Key: nil,
|
||||
Limit: 2,
|
||||
CountTotal: true,
|
||||
|
@ -261,7 +261,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionChannels() {
|
|||
expChannels = []*types.IdentifiedChannel{}
|
||||
req = &types.QueryConnectionChannelsRequest{
|
||||
Connection: "externalConnID",
|
||||
Req: &query.PageRequest{
|
||||
Pagination: &query.PageRequest{
|
||||
Key: nil,
|
||||
Limit: 2,
|
||||
CountTotal: false,
|
||||
|
@ -425,7 +425,7 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitments() {
|
|||
req = &types.QueryPacketCommitmentsRequest{
|
||||
PortID: "test-port-id",
|
||||
ChannelID: "test-channel-id",
|
||||
Req: &query.PageRequest{
|
||||
Pagination: &query.PageRequest{
|
||||
Key: nil,
|
||||
Limit: 2,
|
||||
CountTotal: true,
|
||||
|
@ -450,7 +450,7 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitments() {
|
|||
req = &types.QueryPacketCommitmentsRequest{
|
||||
PortID: channelA.PortID,
|
||||
ChannelID: channelA.ID,
|
||||
Req: &query.PageRequest{
|
||||
Pagination: &query.PageRequest{
|
||||
Key: nil,
|
||||
Limit: 11,
|
||||
CountTotal: true,
|
||||
|
|
|
@ -162,7 +162,7 @@ func (m *QueryChannelResponse) GetProofHeight() uint64 {
|
|||
// QueryChannelsRequest is the request type for the Query/Channels RPC method
|
||||
type QueryChannelsRequest struct {
|
||||
// pagination request
|
||||
Req *query.PageRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryChannelsRequest) Reset() { *m = QueryChannelsRequest{} }
|
||||
|
@ -198,9 +198,9 @@ func (m *QueryChannelsRequest) XXX_DiscardUnknown() {
|
|||
|
||||
var xxx_messageInfo_QueryChannelsRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryChannelsRequest) GetReq() *query.PageRequest {
|
||||
func (m *QueryChannelsRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ type QueryChannelsResponse struct {
|
|||
// list of stored channels of the chain.
|
||||
Channels []*IdentifiedChannel `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"`
|
||||
// pagination response
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
// query block height
|
||||
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
|
||||
}
|
||||
|
@ -255,9 +255,9 @@ func (m *QueryChannelsResponse) GetChannels() []*IdentifiedChannel {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryChannelsResponse) GetRes() *query.PageResponse {
|
||||
func (m *QueryChannelsResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ type QueryConnectionChannelsRequest struct {
|
|||
// connection unique identifier
|
||||
Connection string `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"`
|
||||
// pagination request
|
||||
Req *query.PageRequest `protobuf:"bytes,2,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryConnectionChannelsRequest) Reset() { *m = QueryConnectionChannelsRequest{} }
|
||||
|
@ -317,9 +317,9 @@ func (m *QueryConnectionChannelsRequest) GetConnection() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (m *QueryConnectionChannelsRequest) GetReq() *query.PageRequest {
|
||||
func (m *QueryConnectionChannelsRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ type QueryConnectionChannelsResponse struct {
|
|||
// list of channels associated with a connection.
|
||||
Channels []*IdentifiedChannel `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"`
|
||||
// pagination response
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
// query block height
|
||||
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
|
||||
}
|
||||
|
@ -374,9 +374,9 @@ func (m *QueryConnectionChannelsResponse) GetChannels() []*IdentifiedChannel {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryConnectionChannelsResponse) GetRes() *query.PageResponse {
|
||||
func (m *QueryConnectionChannelsResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -533,7 +533,7 @@ type QueryPacketCommitmentsRequest struct {
|
|||
// channel unique identifier
|
||||
ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
|
||||
// pagination request
|
||||
Req *query.PageRequest `protobuf:"bytes,3,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryPacketCommitmentsRequest) Reset() { *m = QueryPacketCommitmentsRequest{} }
|
||||
|
@ -583,9 +583,9 @@ func (m *QueryPacketCommitmentsRequest) GetChannelID() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (m *QueryPacketCommitmentsRequest) GetReq() *query.PageRequest {
|
||||
func (m *QueryPacketCommitmentsRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ func (m *QueryPacketCommitmentsRequest) GetReq() *query.PageRequest {
|
|||
type QueryPacketCommitmentsResponse struct {
|
||||
Commitments []*PacketAckCommitment `protobuf:"bytes,1,rep,name=commitments,proto3" json:"commitments,omitempty"`
|
||||
// pagination response
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
// query block height
|
||||
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
|
||||
}
|
||||
|
@ -639,9 +639,9 @@ func (m *QueryPacketCommitmentsResponse) GetCommitments() []*PacketAckCommitment
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryPacketCommitmentsResponse) GetRes() *query.PageResponse {
|
||||
func (m *QueryPacketCommitmentsResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -1182,64 +1182,64 @@ func init() { proto.RegisterFile("ibc/channel/query.proto", fileDescriptor_21509
|
|||
|
||||
var fileDescriptor_2150995751d4f15a = []byte{
|
||||
// 928 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0xe3, 0x44,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x41, 0x6f, 0xe3, 0x44,
|
||||
0x14, 0x8e, 0x9b, 0x6c, 0xda, 0xbc, 0x14, 0xb1, 0x4c, 0x5b, 0x48, 0xcd, 0xd6, 0x4d, 0xcd, 0x25,
|
||||
0x6c, 0x5b, 0x07, 0x65, 0x39, 0x71, 0xdb, 0x76, 0x0f, 0xe4, 0x00, 0x0a, 0x5e, 0xed, 0x05, 0x09,
|
||||
0x45, 0xae, 0x33, 0x9b, 0x58, 0x69, 0x66, 0xdc, 0xcc, 0x64, 0x69, 0xf9, 0x1f, 0x90, 0x10, 0x17,
|
||||
0xc4, 0x05, 0x0e, 0x48, 0x1c, 0x38, 0xf0, 0x77, 0x70, 0xdc, 0x23, 0x17, 0x2a, 0x94, 0xfe, 0x1b,
|
||||
0x1c, 0x90, 0xe7, 0x87, 0xe3, 0x24, 0x76, 0xe5, 0x03, 0x16, 0x7b, 0x4a, 0xfc, 0xe6, 0x9b, 0xf7,
|
||||
0xbe, 0xf7, 0xcd, 0x37, 0xe3, 0x31, 0xbc, 0x17, 0x5c, 0xf8, 0x6d, 0x7f, 0xe4, 0x11, 0x82, 0x2f,
|
||||
0xdb, 0x57, 0x33, 0x3c, 0xbd, 0x71, 0xc2, 0x29, 0xe5, 0x14, 0xd5, 0x83, 0x0b, 0xdf, 0x51, 0x03,
|
||||
0xe6, 0xee, 0x90, 0x0e, 0xa9, 0x88, 0xb7, 0xa3, 0x7f, 0x12, 0x62, 0x1e, 0xf8, 0x94, 0x4d, 0x28,
|
||||
0x93, 0xd3, 0xda, 0xa1, 0x37, 0x0c, 0x88, 0xc7, 0x03, 0x4a, 0xd4, 0xf0, 0x7e, 0x32, 0xb5, 0xfa,
|
||||
0x95, 0x43, 0xf6, 0x08, 0x76, 0xbe, 0x88, 0x26, 0x9d, 0xcb, 0xa8, 0x8b, 0xaf, 0x66, 0x98, 0x71,
|
||||
0xf4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3, 0xba, 0x81, 0x3b, 0xf2, 0xa9, 0x2b, 0x7c, 0x46, 0xf5, 0xf0, 0x6e, 0x32, 0xb5,
|
||||
0xfe, 0x55, 0x43, 0xf6, 0x18, 0xb6, 0x9e, 0x85, 0x93, 0x4e, 0x54, 0x14, 0x93, 0xf3, 0x0b, 0xc2,
|
||||
0x05, 0xfa, 0x00, 0xd6, 0x03, 0x36, 0x13, 0x03, 0x7f, 0xd8, 0x32, 0xda, 0x46, 0xa7, 0x71, 0x0c,
|
||||
0xf3, 0xeb, 0xfd, 0x7a, 0x9f, 0xcd, 0x44, 0xef, 0x29, 0xae, 0x87, 0x43, 0xbd, 0x21, 0x7a, 0x08,
|
||||
0xa0, 0x93, 0x85, 0xb8, 0x35, 0x89, 0x7b, 0x6b, 0x7e, 0xbd, 0xdf, 0xd0, 0xc9, 0x7a, 0x4f, 0x71,
|
||||
0x43, 0x03, 0x7a, 0x43, 0xfb, 0x47, 0x03, 0xb6, 0xd3, 0xa5, 0x78, 0xc0, 0x28, 0x27, 0xc8, 0x81,
|
||||
0x75, 0x8d, 0x92, 0xb5, 0x9a, 0x47, 0xdb, 0x4e, 0xa2, 0x63, 0x27, 0x82, 0x47, 0x20, 0xb4, 0x0d,
|
||||
0x77, 0x82, 0x19, 0x63, 0x2f, 0x65, 0xc5, 0x4d, 0xac, 0x1e, 0xd0, 0x1e, 0x80, 0xfc, 0x33, 0x08,
|
||||
0x5c, 0x31, 0x6e, 0x55, 0x43, 0x32, 0xb8, 0x21, 0x23, 0x7d, 0x57, 0x8c, 0xd1, 0x01, 0x6c, 0xaa,
|
||||
0xe1, 0x31, 0xf1, 0x47, 0x63, 0xd1, 0xaa, 0xb5, 0x8d, 0x4e, 0x0d, 0x37, 0x65, 0xec, 0x53, 0x19,
|
||||
0xb2, 0x9f, 0xa5, 0xf9, 0xf1, 0x48, 0x8b, 0x4f, 0x00, 0x16, 0x8a, 0x6a, 0x8a, 0xbb, 0x8e, 0x52,
|
||||
0xdc, 0x51, 0x0b, 0xd5, 0x77, 0x47, 0x44, 0xc3, 0x71, 0x02, 0x6c, 0xff, 0x6c, 0xc0, 0x4e, 0x26,
|
||||
0xa7, 0x6e, 0xfa, 0x31, 0x6c, 0xe8, 0x7e, 0x78, 0xcb, 0x68, 0x57, 0x3b, 0xcd, 0x23, 0x2b, 0xd5,
|
||||
0x75, 0x6f, 0x48, 0xa8, 0xf0, 0x5f, 0xfa, 0x64, 0x18, 0xf5, 0x1f, 0xe3, 0xd1, 0xe3, 0x14, 0xa1,
|
||||
0x35, 0x49, 0xc8, 0xcc, 0x23, 0xa4, 0x6a, 0x25, 0x19, 0xa1, 0x77, 0xa1, 0xae, 0x15, 0x08, 0x25,
|
||||
0xaa, 0x62, 0xfd, 0x64, 0x7f, 0x03, 0x96, 0x22, 0xca, 0x28, 0x25, 0x5e, 0x08, 0xcd, 0xca, 0x60,
|
||||
0x01, 0x78, 0xf1, 0xa0, 0x72, 0x05, 0x4e, 0x44, 0x32, 0x32, 0xad, 0xbd, 0x89, 0x4c, 0xbf, 0x19,
|
||||
0xb0, 0x5f, 0x58, 0xfd, 0x7f, 0x2a, 0xd8, 0xb7, 0x06, 0xdc, 0x93, 0x9c, 0xfb, 0xae, 0x37, 0x21,
|
||||
0xe2, 0x84, 0x4d, 0xa7, 0xbe, 0x98, 0x12, 0x2a, 0xca, 0xdb, 0x42, 0xc8, 0x84, 0x0d, 0x1e, 0x66,
|
||||
0xa7, 0x1e, 0x91, 0x6c, 0x6a, 0x38, 0x7e, 0xb6, 0x7f, 0x30, 0x60, 0xaf, 0x80, 0x8f, 0x56, 0x50,
|
||||
0x2e, 0x60, 0x14, 0x95, 0x9c, 0x36, 0x71, 0x22, 0x52, 0xda, 0xbe, 0xfa, 0xa5, 0x88, 0x19, 0x2f,
|
||||
0x51, 0xaa, 0xb4, 0x1b, 0xab, 0x6f, 0xe2, 0xc6, 0xdf, 0x0d, 0xbd, 0x17, 0x72, 0xf8, 0x6a, 0x29,
|
||||
0x8f, 0xa1, 0xb9, 0x10, 0x2e, 0xf2, 0x63, 0x3b, 0xe5, 0x47, 0x35, 0xf9, 0x89, 0x37, 0x49, 0xac,
|
||||
0x44, 0x72, 0x52, 0x29, 0xa6, 0xfc, 0xde, 0x80, 0x83, 0x04, 0xf5, 0x27, 0xde, 0x84, 0xb2, 0xaf,
|
||||
0xce, 0xc8, 0x70, 0x44, 0xfe, 0x43, 0x67, 0xfe, 0x64, 0x80, 0x7d, 0x1b, 0x29, 0xad, 0x69, 0x07,
|
||||
0xde, 0x76, 0xd3, 0x43, 0xda, 0xa3, 0xd9, 0x70, 0x69, 0x46, 0xfd, 0x27, 0xda, 0xd2, 0x2f, 0xe8,
|
||||
0x8c, 0x9c, 0xb9, 0x57, 0x64, 0xa8, 0x18, 0x97, 0xe9, 0xd3, 0x2f, 0xe1, 0xfd, 0x40, 0x16, 0x19,
|
||||
0x2c, 0xbc, 0x31, 0x88, 0xa4, 0xe3, 0xad, 0x6a, 0xbb, 0xda, 0xa9, 0x1d, 0xef, 0xcd, 0xaf, 0xf7,
|
||||
0x77, 0xb3, 0x6e, 0x7c, 0x1e, 0x81, 0xf0, 0x6e, 0x50, 0x34, 0x84, 0xee, 0xc3, 0xdd, 0x8c, 0x7a,
|
||||
0x5c, 0x76, 0xbe, 0x81, 0x97, 0xe2, 0xf6, 0x0b, 0xbd, 0x4d, 0x97, 0xbb, 0xd7, 0x2b, 0x74, 0x0f,
|
||||
0x1a, 0x0b, 0x66, 0xa1, 0xe7, 0x6b, 0x78, 0x11, 0x48, 0x78, 0x72, 0x2d, 0xe5, 0x49, 0xa1, 0xcf,
|
||||
0xf6, 0xcf, 0xc9, 0x65, 0x4c, 0x0c, 0x13, 0x8f, 0xf8, 0xaf, 0x48, 0x89, 0xb7, 0x8d, 0x5f, 0x0d,
|
||||
0x68, 0x17, 0x97, 0xd5, 0x0d, 0x1d, 0xc1, 0x0e, 0x25, 0x97, 0x0b, 0xbd, 0x07, 0x33, 0x05, 0x90,
|
||||
0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x22, 0x3a,
|
||||
0xaa, 0x7a, 0xfc, 0xd9, 0x1f, 0x73, 0xcb, 0x78, 0x3d, 0xb7, 0x8c, 0xbf, 0xe7, 0x96, 0xf1, 0xdd,
|
||||
0x8d, 0x55, 0x79, 0x7d, 0x63, 0x55, 0xfe, 0xbc, 0xb1, 0x2a, 0x5f, 0x3c, 0x1a, 0xf9, 0x62, 0x7c,
|
||||
0x71, 0xea, 0x78, 0x6c, 0xda, 0xd5, 0x1f, 0x8d, 0xea, 0xe7, 0x90, 0x0f, 0x27, 0xdd, 0xcb, 0x6e,
|
||||
0xf8, 0xa5, 0xf8, 0xd1, 0xc7, 0x87, 0xd1, 0xc7, 0xa2, 0xb8, 0x0a, 0x08, 0x3f, 0xad, 0xcb, 0x6f,
|
||||
0xc5, 0x47, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x46, 0x7e, 0x04, 0x78, 0xa3, 0x0e, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -1701,9 +1701,9 @@ func (m *QueryChannelsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1741,9 +1741,9 @@ func (m *QueryChannelsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1790,9 +1790,9 @@ func (m *QueryConnectionChannelsRequest) MarshalToSizedBuffer(dAtA []byte) (int,
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1837,9 +1837,9 @@ func (m *QueryConnectionChannelsResponse) MarshalToSizedBuffer(dAtA []byte) (int
|
|||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -1977,9 +1977,9 @@ func (m *QueryPacketCommitmentsRequest) MarshalToSizedBuffer(dAtA []byte) (int,
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -2031,9 +2031,9 @@ func (m *QueryPacketCommitmentsResponse) MarshalToSizedBuffer(dAtA []byte) (int,
|
|||
i--
|
||||
dAtA[i] = 0x18
|
||||
}
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -2478,8 +2478,8 @@ func (m *QueryChannelsRequest) Size() (n int) {
|
|||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -2497,8 +2497,8 @@ func (m *QueryChannelsResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.Height != 0 {
|
||||
|
@ -2517,8 +2517,8 @@ func (m *QueryConnectionChannelsRequest) Size() (n int) {
|
|||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -2536,8 +2536,8 @@ func (m *QueryConnectionChannelsResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.Height != 0 {
|
||||
|
@ -2604,8 +2604,8 @@ func (m *QueryPacketCommitmentsRequest) Size() (n int) {
|
|||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -2623,8 +2623,8 @@ func (m *QueryPacketCommitmentsResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.Height != 0 {
|
||||
|
@ -3125,7 +3125,7 @@ func (m *QueryChannelsRequest) Unmarshal(dAtA []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -3152,10 +3152,10 @@ func (m *QueryChannelsRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -3248,7 +3248,7 @@ func (m *QueryChannelsResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -3275,10 +3275,10 @@ func (m *QueryChannelsResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -3388,7 +3388,7 @@ func (m *QueryConnectionChannelsRequest) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -3415,10 +3415,10 @@ func (m *QueryConnectionChannelsRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -3511,7 +3511,7 @@ func (m *QueryConnectionChannelsResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -3538,10 +3538,10 @@ func (m *QueryConnectionChannelsResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -3991,7 +3991,7 @@ func (m *QueryPacketCommitmentsRequest) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -4018,10 +4018,10 @@ func (m *QueryPacketCommitmentsRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -4114,7 +4114,7 @@ func (m *QueryPacketCommitmentsResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -4141,10 +4141,10 @@ func (m *QueryPacketCommitmentsResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
|
|
@ -93,7 +93,7 @@ $ <appcli> query slashing signing-infos
|
|||
|
||||
queryClient := types.NewQueryClient(clientCtx)
|
||||
|
||||
params := &types.QuerySigningInfosRequest{Req: client.ReadPageRequest(cmd.Flags())}
|
||||
params := &types.QuerySigningInfosRequest{Pagination: client.ReadPageRequest(cmd.Flags())}
|
||||
res, err := queryClient.SigningInfos(context.Background(), params)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -53,7 +53,7 @@ func (k Keeper) SigningInfos(c context.Context, req *types.QuerySigningInfosRequ
|
|||
var signInfos []types.ValidatorSigningInfo
|
||||
|
||||
sigInfoStore := prefix.NewStore(store, types.ValidatorSigningInfoKeyPrefix)
|
||||
res, err := query.Paginate(sigInfoStore, req.Req, func(key []byte, value []byte) error {
|
||||
pageRes, err := query.Paginate(sigInfoStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
var info types.ValidatorSigningInfo
|
||||
err := k.cdc.UnmarshalBinaryBare(value, &info)
|
||||
if err != nil {
|
||||
|
@ -65,5 +65,5 @@ func (k Keeper) SigningInfos(c context.Context, req *types.QuerySigningInfosRequ
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &types.QuerySigningInfosResponse{Info: signInfos, Res: res}, nil
|
||||
return &types.QuerySigningInfosResponse{Info: signInfos, Pagination: pageRes}, nil
|
||||
}
|
||||
|
|
|
@ -92,17 +92,17 @@ func (suite *SlashingTestSuite) TestGRPCSigningInfos() {
|
|||
|
||||
// verify all values are returned without pagination
|
||||
var infoResp, err = queryClient.SigningInfos(gocontext.Background(),
|
||||
&types.QuerySigningInfosRequest{Req: nil})
|
||||
&types.QuerySigningInfosRequest{Pagination: nil})
|
||||
suite.NoError(err)
|
||||
suite.Equal(signingInfos, infoResp.Info)
|
||||
|
||||
infoResp, err = queryClient.SigningInfos(gocontext.Background(),
|
||||
&types.QuerySigningInfosRequest{Req: &query.PageRequest{Limit: 1, CountTotal: true}})
|
||||
&types.QuerySigningInfosRequest{Pagination: &query.PageRequest{Limit: 1, CountTotal: true}})
|
||||
suite.NoError(err)
|
||||
suite.Len(infoResp.Info, 1)
|
||||
suite.Equal(signingInfos[0], infoResp.Info[0])
|
||||
suite.NotNil(infoResp.Res.NextKey)
|
||||
suite.Equal(uint64(2), infoResp.Res.Total)
|
||||
suite.NotNil(infoResp.Pagination.NextKey)
|
||||
suite.Equal(uint64(2), infoResp.Pagination.Total)
|
||||
}
|
||||
|
||||
func TestSlashingTestSuite(t *testing.T) {
|
||||
|
|
|
@ -206,7 +206,7 @@ func (m *QuerySigningInfoResponse) GetValSigningInfo() ValidatorSigningInfo {
|
|||
|
||||
// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC method
|
||||
type QuerySigningInfosRequest struct {
|
||||
Req *query.PageRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"`
|
||||
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QuerySigningInfosRequest) Reset() { *m = QuerySigningInfosRequest{} }
|
||||
|
@ -242,9 +242,9 @@ func (m *QuerySigningInfosRequest) XXX_DiscardUnknown() {
|
|||
|
||||
var xxx_messageInfo_QuerySigningInfosRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *QuerySigningInfosRequest) GetReq() *query.PageRequest {
|
||||
func (m *QuerySigningInfosRequest) GetPagination() *query.PageRequest {
|
||||
if m != nil {
|
||||
return m.Req
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -252,8 +252,8 @@ func (m *QuerySigningInfosRequest) GetReq() *query.PageRequest {
|
|||
// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC method
|
||||
type QuerySigningInfosResponse struct {
|
||||
// info is the signing info of all validators
|
||||
Info []ValidatorSigningInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info"`
|
||||
Res *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
|
||||
Info []ValidatorSigningInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info"`
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QuerySigningInfosResponse) Reset() { *m = QuerySigningInfosResponse{} }
|
||||
|
@ -296,9 +296,9 @@ func (m *QuerySigningInfosResponse) GetInfo() []ValidatorSigningInfo {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *QuerySigningInfosResponse) GetRes() *query.PageResponse {
|
||||
func (m *QuerySigningInfosResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Res
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -315,36 +315,36 @@ func init() {
|
|||
func init() { proto.RegisterFile("cosmos/slashing/query.proto", fileDescriptor_12bf00fd6c136588) }
|
||||
|
||||
var fileDescriptor_12bf00fd6c136588 = []byte{
|
||||
// 460 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcd, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xb6, 0xdb, 0x92, 0xc3, 0x26, 0x02, 0xb4, 0x54, 0x6a, 0x6a, 0x84, 0x8b, 0x0c, 0x48, 0xe5,
|
||||
0xa7, 0xb6, 0x14, 0xc4, 0x19, 0x11, 0x0e, 0x15, 0x12, 0x87, 0x62, 0x14, 0x0e, 0x5c, 0xa2, 0xad,
|
||||
0xbd, 0xdd, 0xae, 0x70, 0x76, 0x6d, 0x8f, 0x53, 0xd1, 0x57, 0xe0, 0xc4, 0x8b, 0xf0, 0x1e, 0x3d,
|
||||
0xe6, 0xc8, 0x29, 0x42, 0xc9, 0x5b, 0x70, 0x42, 0xde, 0x5d, 0x27, 0x26, 0x8e, 0x42, 0x38, 0x79,
|
||||
0x3c, 0xf3, 0xcd, 0x7c, 0xdf, 0xb7, 0x3b, 0x8b, 0xee, 0x47, 0x12, 0x46, 0x12, 0x02, 0x48, 0x08,
|
||||
0x5c, 0x72, 0xc1, 0x82, 0x6c, 0x4c, 0xf3, 0x6b, 0x3f, 0xcd, 0x65, 0x21, 0xf1, 0x1d, 0x5d, 0xf4,
|
||||
0xab, 0xa2, 0xf3, 0xc0, 0xa0, 0x15, 0x28, 0x48, 0x09, 0xe3, 0x82, 0x14, 0x5c, 0x0a, 0x8d, 0x77,
|
||||
0xf6, 0x99, 0x64, 0x52, 0x85, 0x41, 0x19, 0x99, 0xac, 0xbb, 0x4a, 0x51, 0x05, 0xba, 0xee, 0xed,
|
||||
0x23, 0xfc, 0xa1, 0x9c, 0x77, 0x46, 0x72, 0x32, 0x82, 0x90, 0x66, 0x63, 0x0a, 0x85, 0xf7, 0x1e,
|
||||
0xdd, 0xfb, 0x2b, 0x0b, 0xa9, 0x14, 0x40, 0xf1, 0x2b, 0xd4, 0x4a, 0x55, 0xa6, 0x6b, 0x3f, 0xb4,
|
||||
0x8f, 0xdb, 0xbd, 0x03, 0x7f, 0x45, 0xa3, 0xaf, 0x1b, 0xfa, 0x7b, 0x37, 0xd3, 0x23, 0x2b, 0x34,
|
||||
0x60, 0x2f, 0x45, 0x07, 0x6a, 0xda, 0x47, 0xce, 0x04, 0x17, 0xec, 0x9d, 0xb8, 0x90, 0x86, 0x08,
|
||||
0x0f, 0x50, 0x27, 0x92, 0x02, 0x86, 0x24, 0x8e, 0x73, 0x0a, 0x7a, 0x6e, 0xa7, 0xdf, 0xfb, 0x3d,
|
||||
0x3d, 0xf2, 0x19, 0x2f, 0x2e, 0xc7, 0xe7, 0x7e, 0x24, 0x47, 0x81, 0xf1, 0xa0, 0x3f, 0x27, 0x10,
|
||||
0x7f, 0x09, 0x8a, 0xeb, 0x94, 0x82, 0xff, 0x56, 0x0a, 0x78, 0xa3, 0x3b, 0xc3, 0x76, 0xb4, 0xfc,
|
||||
0xf1, 0x32, 0xd4, 0x6d, 0x32, 0x1a, 0x13, 0x03, 0x74, 0xf7, 0x8a, 0x24, 0x43, 0xd0, 0xa5, 0x21,
|
||||
0x17, 0x17, 0xd2, 0xd8, 0x79, 0xd2, 0xb0, 0xf3, 0x89, 0x24, 0x3c, 0x26, 0x85, 0xcc, 0x6b, 0x83,
|
||||
0x8c, 0xb9, 0xdb, 0x57, 0x24, 0xa9, 0x65, 0xbd, 0xd3, 0x26, 0x65, 0x75, 0x9c, 0xf8, 0x39, 0xda,
|
||||
0xcd, 0x69, 0x66, 0x58, 0x0e, 0x2b, 0x16, 0x7d, 0xd9, 0x67, 0x84, 0x51, 0x83, 0x0b, 0x4b, 0x94,
|
||||
0xf7, 0xcd, 0x46, 0x87, 0x6b, 0x26, 0x19, 0xf5, 0xaf, 0xd1, 0x9e, 0x51, 0xbc, 0xfb, 0xbf, 0x8a,
|
||||
0x55, 0x23, 0x7e, 0x51, 0x6a, 0x81, 0xee, 0x8e, 0xd2, 0xe2, 0xac, 0xd3, 0xa2, 0x99, 0x4a, 0x31,
|
||||
0xd0, 0xfb, 0xb1, 0x83, 0x6e, 0x29, 0x31, 0x78, 0x80, 0x5a, 0xfa, 0x72, 0xf1, 0xa3, 0x06, 0x69,
|
||||
0x73, 0x83, 0x9c, 0xc7, 0x9b, 0x41, 0x9a, 0xc3, 0xb3, 0x70, 0x8c, 0xda, 0x35, 0xa5, 0xf8, 0x78,
|
||||
0x7d, 0x5b, 0x73, 0x73, 0x9c, 0xa7, 0x5b, 0x20, 0x17, 0x2c, 0x0c, 0x75, 0xea, 0xa7, 0x89, 0xff,
|
||||
0xdd, 0xbc, 0x30, 0xf2, 0x6c, 0x1b, 0x68, 0x45, 0xd4, 0x3f, 0xbd, 0x99, 0xb9, 0xf6, 0x64, 0xe6,
|
||||
0xda, 0xbf, 0x66, 0xae, 0xfd, 0x7d, 0xee, 0x5a, 0x93, 0xb9, 0x6b, 0xfd, 0x9c, 0xbb, 0xd6, 0xe7,
|
||||
0x93, 0x8d, 0xfb, 0xfc, 0x75, 0xf9, 0x40, 0xd5, 0x6a, 0x9f, 0xb7, 0xd4, 0xf3, 0x7c, 0xf9, 0x27,
|
||||
0x00, 0x00, 0xff, 0xff, 0x73, 0x48, 0x10, 0xb6, 0x23, 0x04, 0x00, 0x00,
|
||||
// 459 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xb1, 0x8e, 0xd3, 0x40,
|
||||
0x10, 0xb5, 0x8f, 0x23, 0xc5, 0x24, 0x02, 0xb4, 0x9c, 0x74, 0x77, 0x46, 0xf8, 0x90, 0x01, 0xe9,
|
||||
0x40, 0x3a, 0x5b, 0x0a, 0xa2, 0x80, 0x06, 0x11, 0x0a, 0x84, 0x44, 0x71, 0x18, 0x99, 0x82, 0x26,
|
||||
0xda, 0xd8, 0xce, 0x66, 0x85, 0xb3, 0xeb, 0x78, 0x9d, 0x88, 0xfc, 0x05, 0x25, 0x3f, 0xc1, 0x7f,
|
||||
0xa4, 0x4c, 0x49, 0x15, 0xa1, 0xe4, 0x2f, 0xa8, 0x50, 0x76, 0xd7, 0x89, 0x13, 0x47, 0x21, 0x57,
|
||||
0x79, 0x3d, 0xf3, 0x66, 0xde, 0x7b, 0x3b, 0xb3, 0xf0, 0x20, 0xe4, 0xa2, 0xcf, 0x85, 0x27, 0x12,
|
||||
0x2c, 0x7a, 0x94, 0x11, 0x6f, 0x30, 0x8c, 0xb3, 0xb1, 0x9b, 0x66, 0x3c, 0xe7, 0xe8, 0xae, 0x4a,
|
||||
0xba, 0x45, 0xd2, 0x7a, 0xa8, 0xd1, 0x12, 0xe4, 0xa5, 0x98, 0x50, 0x86, 0x73, 0xca, 0x99, 0xc2,
|
||||
0x5b, 0x27, 0x84, 0x13, 0x2e, 0x8f, 0xde, 0xf2, 0xa4, 0xa3, 0xf6, 0x36, 0x45, 0x71, 0x50, 0x79,
|
||||
0xe7, 0x04, 0xd0, 0xa7, 0x65, 0xbf, 0x6b, 0x9c, 0xe1, 0xbe, 0xf0, 0xe3, 0xc1, 0x30, 0x16, 0xb9,
|
||||
0xf3, 0x11, 0xee, 0x6f, 0x44, 0x45, 0xca, 0x99, 0x88, 0xd1, 0x4b, 0xa8, 0xa5, 0x32, 0x72, 0x66,
|
||||
0x3e, 0x32, 0x2f, 0xeb, 0xcd, 0x53, 0x77, 0x4b, 0xa3, 0xab, 0x0a, 0x5a, 0xc7, 0x93, 0xd9, 0x85,
|
||||
0xe1, 0x6b, 0xb0, 0x93, 0xc2, 0xa9, 0xec, 0xf6, 0x99, 0x12, 0x46, 0x19, 0xf9, 0xc0, 0xba, 0x5c,
|
||||
0x13, 0xa1, 0x00, 0x1a, 0x21, 0x67, 0xa2, 0x8d, 0xa3, 0x28, 0x8b, 0x85, 0xea, 0xdb, 0x68, 0x35,
|
||||
0xff, 0xce, 0x2e, 0x5c, 0x42, 0xf3, 0xde, 0xb0, 0xe3, 0x86, 0xbc, 0xef, 0x69, 0x0f, 0xea, 0x73,
|
||||
0x25, 0xa2, 0x6f, 0x5e, 0x3e, 0x4e, 0x63, 0xe1, 0xbe, 0xe3, 0x4c, 0xbc, 0x55, 0x95, 0x7e, 0x3d,
|
||||
0x5c, 0xff, 0x38, 0x03, 0x38, 0xab, 0x32, 0x6a, 0x13, 0x01, 0xdc, 0x1b, 0xe1, 0xa4, 0x2d, 0x54,
|
||||
0xaa, 0x4d, 0x59, 0x97, 0x6b, 0x3b, 0x4f, 0x2b, 0x76, 0xbe, 0xe0, 0x84, 0x46, 0x38, 0xe7, 0x59,
|
||||
0xa9, 0x91, 0x36, 0x77, 0x67, 0x84, 0x93, 0x52, 0xd4, 0x09, 0xaa, 0x94, 0xc5, 0x75, 0xa2, 0x57,
|
||||
0x00, 0xeb, 0x71, 0x69, 0xb2, 0xf3, 0x82, 0x4c, 0xcd, 0xfc, 0x1a, 0x93, 0x58, 0xc3, 0xfd, 0x12,
|
||||
0xd8, 0xf9, 0x69, 0xc2, 0xf9, 0x8e, 0xbe, 0xda, 0xcb, 0x1b, 0x38, 0xd6, 0xfa, 0x6f, 0xdd, 0x54,
|
||||
0xbf, 0x2c, 0x44, 0xaf, 0x37, 0x94, 0x1d, 0x49, 0x65, 0xd6, 0x2e, 0x65, 0x8a, 0xb0, 0x2c, 0xad,
|
||||
0xf9, 0xeb, 0x08, 0x6e, 0x4b, 0x69, 0x28, 0x80, 0x9a, 0x1a, 0x3c, 0x7a, 0x5c, 0x91, 0x50, 0xdd,
|
||||
0x2e, 0xeb, 0xc9, 0x7e, 0x90, 0xa2, 0x72, 0x0c, 0x14, 0x41, 0xbd, 0xa4, 0x1b, 0x5d, 0xee, 0x2e,
|
||||
0xab, 0x6e, 0x95, 0xf5, 0xec, 0x00, 0xe4, 0x8a, 0x85, 0x40, 0xa3, 0x7c, 0xb7, 0xe8, 0xff, 0xc5,
|
||||
0x2b, 0x23, 0xcf, 0x0f, 0x81, 0x16, 0x44, 0xad, 0xf7, 0x93, 0xb9, 0x6d, 0x4e, 0xe7, 0xb6, 0xf9,
|
||||
0x67, 0x6e, 0x9b, 0x3f, 0x16, 0xb6, 0x31, 0x5d, 0xd8, 0xc6, 0xef, 0x85, 0x6d, 0x7c, 0xbd, 0xda,
|
||||
0xbb, 0xeb, 0xdf, 0xd7, 0x8f, 0x57, 0xae, 0x7d, 0xa7, 0x26, 0x9f, 0xee, 0x8b, 0x7f, 0x01, 0x00,
|
||||
0x00, 0xff, 0xff, 0x59, 0xd0, 0x27, 0x68, 0x3f, 0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -644,9 +644,9 @@ func (m *QuerySigningInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Req.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -679,9 +679,9 @@ func (m *QuerySigningInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Res != nil {
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Res.MarshalToSizedBuffer(dAtA[:i])
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -769,8 +769,8 @@ func (m *QuerySigningInfosRequest) Size() (n int) {
|
|||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Req != nil {
|
||||
l = m.Req.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -788,8 +788,8 @@ func (m *QuerySigningInfosResponse) Size() (n int) {
|
|||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Res != nil {
|
||||
l = m.Res.Size()
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
|
@ -1144,7 +1144,7 @@ func (m *QuerySigningInfosRequest) Unmarshal(dAtA []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -1171,10 +1171,10 @@ func (m *QuerySigningInfosRequest) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Req == nil {
|
||||
m.Req = &query.PageRequest{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageRequest{}
|
||||
}
|
||||
if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
@ -1267,7 +1267,7 @@ func (m *QuerySigningInfosResponse) Unmarshal(dAtA []byte) error {
|
|||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -1294,10 +1294,10 @@ func (m *QuerySigningInfosResponse) Unmarshal(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Res == nil {
|
||||
m.Res = &query.PageResponse{}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
|
|
@ -171,7 +171,7 @@ $ %s query staking unbonding-delegations-from cosmosvaloper1gghjut3ccd8ay0zduzj6
|
|||
|
||||
params := &types.QueryValidatorUnbondingDelegationsRequest{
|
||||
ValidatorAddr: valAddr,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
}
|
||||
|
||||
res, err := queryClient.ValidatorUnbondingDelegations(context.Background(), params)
|
||||
|
@ -226,7 +226,7 @@ $ %s query staking redelegations-from cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fx
|
|||
|
||||
params := &types.QueryRedelegationsRequest{
|
||||
SrcValidatorAddr: valSrcAddr,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
}
|
||||
|
||||
res, err := queryClient.Redelegations(context.Background(), params)
|
||||
|
@ -334,7 +334,7 @@ $ %s query staking delegations cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
|||
|
||||
params := &types.QueryDelegatorDelegationsRequest{
|
||||
DelegatorAddr: delAddr,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
}
|
||||
|
||||
res, err := queryClient.DelegatorDelegations(context.Background(), params)
|
||||
|
@ -389,7 +389,7 @@ $ %s query staking delegations-to cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ld
|
|||
|
||||
params := &types.QueryValidatorDelegationsRequest{
|
||||
ValidatorAddr: valAddr,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
}
|
||||
|
||||
res, err := queryClient.ValidatorDelegations(context.Background(), params)
|
||||
|
@ -498,7 +498,7 @@ $ %s query staking unbonding-delegations cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld
|
|||
|
||||
params := &types.QueryDelegatorUnbondingDelegationsRequest{
|
||||
DelegatorAddr: delegatorAddr,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
}
|
||||
|
||||
res, err := queryClient.DelegatorUnbondingDelegations(context.Background(), params)
|
||||
|
@ -613,7 +613,7 @@ $ %s query staking redelegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
|
|||
|
||||
params := &types.QueryRedelegationsRequest{
|
||||
DelegatorAddr: delAddr,
|
||||
Req: pageReq,
|
||||
Pagination: pageReq,
|
||||
}
|
||||
|
||||
res, err := queryClient.Redelegations(context.Background(), params)
|
||||
|
|
|
@ -38,7 +38,7 @@ func (k Querier) Validators(c context.Context, req *types.QueryValidatorsRequest
|
|||
store := ctx.KVStore(k.storeKey)
|
||||
valStore := prefix.NewStore(store, types.ValidatorsKey)
|
||||
|
||||
res, err := query.FilteredPaginate(valStore, req.Req, func(key []byte, value []byte, accumulate bool) (bool, error) {
|
||||
pageRes, err := query.FilteredPaginate(valStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) {
|
||||
val, err := types.UnmarshalValidator(k.cdc, value)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
@ -58,7 +58,7 @@ func (k Querier) Validators(c context.Context, req *types.QueryValidatorsRequest
|
|||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return &types.QueryValidatorsResponse{Validators: validators, Res: res}, nil
|
||||
return &types.QueryValidatorsResponse{Validators: validators, Pagination: pageRes}, nil
|
||||
}
|
||||
|
||||
// Validator queries validator info for given validator addr
|
||||
|
@ -93,7 +93,7 @@ func (k Querier) ValidatorDelegations(c context.Context, req *types.QueryValidat
|
|||
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
valStore := prefix.NewStore(store, types.DelegationKey)
|
||||
res, err := query.FilteredPaginate(valStore, req.Req, func(key []byte, value []byte, accumulate bool) (bool, error) {
|
||||
pageRes, err := query.FilteredPaginate(valStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) {
|
||||
delegation, err := types.UnmarshalDelegation(k.cdc, value)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
@ -117,7 +117,7 @@ func (k Querier) ValidatorDelegations(c context.Context, req *types.QueryValidat
|
|||
}
|
||||
|
||||
return &types.QueryValidatorDelegationsResponse{
|
||||
DelegationResponses: delResponses, Res: res}, nil
|
||||
DelegationResponses: delResponses, Pagination: pageRes}, nil
|
||||
}
|
||||
|
||||
// ValidatorUnbondingDelegations queries unbonding delegations of a validator
|
||||
|
@ -134,7 +134,7 @@ func (k Querier) ValidatorUnbondingDelegations(c context.Context, req *types.Que
|
|||
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
ubdStore := prefix.NewStore(store, types.GetUBDsByValIndexKey(req.ValidatorAddr))
|
||||
res, err := query.Paginate(ubdStore, req.Req, func(key []byte, value []byte) error {
|
||||
pageRes, err := query.Paginate(ubdStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
ubd, err := types.UnmarshalUBD(k.cdc, value)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -148,7 +148,7 @@ func (k Querier) ValidatorUnbondingDelegations(c context.Context, req *types.Que
|
|||
|
||||
return &types.QueryValidatorUnbondingDelegationsResponse{
|
||||
UnbondingResponses: ubds,
|
||||
Res: res,
|
||||
Pagination: pageRes,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ func (k Querier) DelegatorDelegations(c context.Context, req *types.QueryDelegat
|
|||
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
delStore := prefix.NewStore(store, types.GetDelegationsKey(req.DelegatorAddr))
|
||||
res, err := query.Paginate(delStore, req.Req, func(key []byte, value []byte) error {
|
||||
pageRes, err := query.Paginate(delStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
delegation, err := types.UnmarshalDelegation(k.cdc, value)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -243,7 +243,7 @@ func (k Querier) DelegatorDelegations(c context.Context, req *types.QueryDelegat
|
|||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return &types.QueryDelegatorDelegationsResponse{DelegationResponses: delegationResps, Res: res}, nil
|
||||
return &types.QueryDelegatorDelegationsResponse{DelegationResponses: delegationResps, Pagination: pageRes}, nil
|
||||
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ func (k Querier) DelegatorUnbondingDelegations(c context.Context, req *types.Que
|
|||
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
unbStore := prefix.NewStore(store, types.GetUBDsKey(req.DelegatorAddr))
|
||||
res, err := query.Paginate(unbStore, req.Req, func(key []byte, value []byte) error {
|
||||
pageRes, err := query.Paginate(unbStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
unbond, err := types.UnmarshalUBD(k.cdc, value)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -296,7 +296,7 @@ func (k Querier) DelegatorUnbondingDelegations(c context.Context, req *types.Que
|
|||
}
|
||||
|
||||
return &types.QueryDelegatorUnbondingDelegationsResponse{
|
||||
UnbondingResponses: unbondingDelegations, Res: res}, nil
|
||||
UnbondingResponses: unbondingDelegations, Pagination: pageRes}, nil
|
||||
}
|
||||
|
||||
// HistoricalInfo queries the historical info for given height
|
||||
|
@ -323,7 +323,7 @@ func (k Querier) Redelegations(c context.Context, req *types.QueryRedelegationsR
|
|||
}
|
||||
|
||||
var redels types.Redelegations
|
||||
var res *query.PageResponse
|
||||
var pageRes *query.PageResponse
|
||||
var err error
|
||||
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
|
@ -332,9 +332,9 @@ func (k Querier) Redelegations(c context.Context, req *types.QueryRedelegationsR
|
|||
case !req.DelegatorAddr.Empty() && !req.SrcValidatorAddr.Empty() && !req.DstValidatorAddr.Empty():
|
||||
redels, err = queryRedelegation(ctx, k, req)
|
||||
case req.DelegatorAddr.Empty() && !req.SrcValidatorAddr.Empty() && req.DstValidatorAddr.Empty():
|
||||
redels, res, err = queryRedelegationsFromSrcValidator(store, k, req)
|
||||
redels, pageRes, err = queryRedelegationsFromSrcValidator(store, k, req)
|
||||
default:
|
||||
redels, res, err = queryAllRedelegations(store, k, req)
|
||||
redels, pageRes, err = queryAllRedelegations(store, k, req)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
|
@ -344,7 +344,7 @@ func (k Querier) Redelegations(c context.Context, req *types.QueryRedelegationsR
|
|||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return &types.QueryRedelegationsResponse{RedelegationResponses: redelResponses, Res: res}, nil
|
||||
return &types.QueryRedelegationsResponse{RedelegationResponses: redelResponses, Pagination: pageRes}, nil
|
||||
}
|
||||
|
||||
func (k Querier) DelegatorValidators(c context.Context, req *types.QueryDelegatorValidatorsRequest) (*types.QueryDelegatorValidatorsResponse, error) {
|
||||
|
@ -360,7 +360,7 @@ func (k Querier) DelegatorValidators(c context.Context, req *types.QueryDelegato
|
|||
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
delStore := prefix.NewStore(store, types.GetDelegationsKey(req.DelegatorAddr))
|
||||
res, err := query.Paginate(delStore, req.Req, func(key []byte, value []byte) error {
|
||||
pageRes, err := query.Paginate(delStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
delegation, err := types.UnmarshalDelegation(k.cdc, value)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -379,7 +379,7 @@ func (k Querier) DelegatorValidators(c context.Context, req *types.QueryDelegato
|
|||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return &types.QueryDelegatorValidatorsResponse{Validators: validators, Res: res}, nil
|
||||
return &types.QueryDelegatorValidatorsResponse{Validators: validators, Pagination: pageRes}, nil
|
||||
}
|
||||
|
||||
// Pool queries the pool info
|
||||
|
@ -421,7 +421,7 @@ func queryRedelegation(ctx sdk.Context, k Querier, req *types.QueryRedelegations
|
|||
func queryRedelegationsFromSrcValidator(store sdk.KVStore, k Querier, req *types.QueryRedelegationsRequest) (redels types.Redelegations, res *query.PageResponse, err error) {
|
||||
srcValPrefix := types.GetREDsFromValSrcIndexKey(req.SrcValidatorAddr)
|
||||
redStore := prefix.NewStore(store, srcValPrefix)
|
||||
res, err = query.Paginate(redStore, req.Req, func(key []byte, value []byte) error {
|
||||
res, err = query.Paginate(redStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
storeKey := types.GetREDKeyFromValSrcIndexKey(append(srcValPrefix, key...))
|
||||
storeValue := store.Get(storeKey)
|
||||
red, err := types.UnmarshalRED(k.cdc, storeValue)
|
||||
|
@ -437,7 +437,7 @@ func queryRedelegationsFromSrcValidator(store sdk.KVStore, k Querier, req *types
|
|||
|
||||
func queryAllRedelegations(store sdk.KVStore, k Querier, req *types.QueryRedelegationsRequest) (redels types.Redelegations, res *query.PageResponse, err error) {
|
||||
redStore := prefix.NewStore(store, types.GetREDsKey(req.DelegatorAddr))
|
||||
res, err = query.Paginate(redStore, req.Req, func(key []byte, value []byte) error {
|
||||
res, err = query.Paginate(redStore, req.Pagination, func(key []byte, value []byte) error {
|
||||
redelegation, err := types.UnmarshalRED(k.cdc, value)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -42,7 +42,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidators() {
|
|||
{"valid request",
|
||||
func() {
|
||||
req = &types.QueryValidatorsRequest{Status: sdk.Bonded.String(),
|
||||
Req: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
Pagination: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
},
|
||||
true,
|
||||
},
|
||||
|
@ -55,8 +55,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidators() {
|
|||
suite.NoError(err)
|
||||
suite.NotNil(valsResp)
|
||||
suite.Equal(1, len(valsResp.Validators))
|
||||
suite.NotNil(valsResp.Res.NextKey)
|
||||
suite.Equal(uint64(len(vals)), valsResp.Res.Total)
|
||||
suite.NotNil(valsResp.Pagination.NextKey)
|
||||
suite.Equal(uint64(len(vals)), valsResp.Pagination.Total)
|
||||
} else {
|
||||
suite.Require().Error(err)
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorValidators() {
|
|||
func() {
|
||||
req = &types.QueryDelegatorValidatorsRequest{
|
||||
DelegatorAddr: addrs[0],
|
||||
Req: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
Pagination: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
},
|
||||
true,
|
||||
},
|
||||
|
@ -138,8 +138,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorValidators() {
|
|||
if tc.expPass {
|
||||
suite.NoError(err)
|
||||
suite.Equal(1, len(res.Validators))
|
||||
suite.NotNil(res.Res.NextKey)
|
||||
suite.Equal(uint64(len(delValidators)), res.Res.Total)
|
||||
suite.NotNil(res.Pagination.NextKey)
|
||||
suite.Equal(uint64(len(delValidators)), res.Pagination.Total)
|
||||
} else {
|
||||
suite.Error(err)
|
||||
suite.Nil(res)
|
||||
|
@ -281,7 +281,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorDelegations() {
|
|||
{"valid request",
|
||||
func() {
|
||||
req = &types.QueryDelegatorDelegationsRequest{DelegatorAddr: addrAcc,
|
||||
Req: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
Pagination: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
},
|
||||
true,
|
||||
},
|
||||
|
@ -292,7 +292,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorDelegations() {
|
|||
tc.malleate()
|
||||
res, err := queryClient.DelegatorDelegations(gocontext.Background(), req)
|
||||
if tc.expPass {
|
||||
suite.Equal(uint64(2), res.Res.Total)
|
||||
suite.Equal(uint64(2), res.Pagination.Total)
|
||||
suite.Len(res.DelegationResponses, 1)
|
||||
suite.Equal(1, len(res.DelegationResponses))
|
||||
suite.Equal(sdk.NewCoin(sdk.DefaultBondDenom, delegation.Shares.TruncateInt()), res.DelegationResponses[0].Balance)
|
||||
|
@ -338,7 +338,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorDelegations() {
|
|||
{"valid request",
|
||||
func() {
|
||||
req = &types.QueryValidatorDelegationsRequest{ValidatorAddr: addrVal1,
|
||||
Req: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
Pagination: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
},
|
||||
true,
|
||||
false,
|
||||
|
@ -352,8 +352,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorDelegations() {
|
|||
if tc.expPass && !tc.expErr {
|
||||
suite.NoError(err)
|
||||
suite.Len(res.DelegationResponses, 1)
|
||||
suite.NotNil(res.Res.NextKey)
|
||||
suite.Equal(uint64(2), res.Res.Total)
|
||||
suite.NotNil(res.Pagination.NextKey)
|
||||
suite.Equal(uint64(2), res.Pagination.Total)
|
||||
suite.Equal(addrVal1, res.DelegationResponses[0].Delegation.ValidatorAddress)
|
||||
suite.Equal(sdk.NewCoin(sdk.DefaultBondDenom, delegation.Shares.TruncateInt()), res.DelegationResponses[0].Balance)
|
||||
} else if !tc.expPass && !tc.expErr {
|
||||
|
@ -457,7 +457,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorUnbondingDelegations() {
|
|||
{"valid request",
|
||||
func() {
|
||||
req = &types.QueryDelegatorUnbondingDelegationsRequest{DelegatorAddr: addrAcc,
|
||||
Req: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
Pagination: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
},
|
||||
true,
|
||||
false,
|
||||
|
@ -470,8 +470,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryDelegatorUnbondingDelegations() {
|
|||
res, err := queryClient.DelegatorUnbondingDelegations(gocontext.Background(), req)
|
||||
if tc.expPass && !tc.expErr {
|
||||
suite.NoError(err)
|
||||
suite.NotNil(res.Res.NextKey)
|
||||
suite.Equal(uint64(2), res.Res.Total)
|
||||
suite.NotNil(res.Pagination.NextKey)
|
||||
suite.Equal(uint64(2), res.Pagination.Total)
|
||||
suite.Len(res.UnbondingResponses, 1)
|
||||
suite.Equal(unbond, res.UnbondingResponses[0])
|
||||
} else if !tc.expPass && !tc.expErr {
|
||||
|
@ -602,7 +602,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegation() {
|
|||
func() {
|
||||
req = &types.QueryRedelegationsRequest{
|
||||
DelegatorAddr: addrAcc1, SrcValidatorAddr: val1.OperatorAddress,
|
||||
DstValidatorAddr: val2.OperatorAddress, Req: &query.PageRequest{}}
|
||||
DstValidatorAddr: val2.OperatorAddress, Pagination: &query.PageRequest{}}
|
||||
},
|
||||
true,
|
||||
false,
|
||||
|
@ -611,7 +611,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegation() {
|
|||
func() {
|
||||
req = &types.QueryRedelegationsRequest{
|
||||
DelegatorAddr: addrAcc1, SrcValidatorAddr: val1.OperatorAddress,
|
||||
Req: &query.PageRequest{}}
|
||||
Pagination: &query.PageRequest{}}
|
||||
},
|
||||
true,
|
||||
false,
|
||||
|
@ -620,7 +620,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryRedelegation() {
|
|||
func() {
|
||||
req = &types.QueryRedelegationsRequest{
|
||||
SrcValidatorAddr: val1.GetOperator(),
|
||||
Req: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
Pagination: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
},
|
||||
true,
|
||||
false,
|
||||
|
@ -676,7 +676,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() {
|
|||
func() {
|
||||
req = &types.QueryValidatorUnbondingDelegationsRequest{
|
||||
ValidatorAddr: val1.GetOperator(),
|
||||
Req: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
Pagination: &query.PageRequest{Limit: 1, CountTotal: true}}
|
||||
},
|
||||
true,
|
||||
},
|
||||
|
@ -688,7 +688,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() {
|
|||
res, err := queryClient.ValidatorUnbondingDelegations(gocontext.Background(), req)
|
||||
if tc.expPass {
|
||||
suite.NoError(err)
|
||||
suite.Equal(uint64(1), res.Res.Total)
|
||||
suite.Equal(uint64(1), res.Pagination.Total)
|
||||
suite.Equal(1, len(res.UnbondingResponses))
|
||||
} else {
|
||||
suite.Error(err)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue