Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Test add missing tests + fix index filtering listauctionhistory" #1329

Merged
merged 1 commit into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/masternodes/rpc_vault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,13 +526,15 @@ UniValue listvaults(const JSONRPCRequest& request) {
if (!including_start)
{
including_start = true;
return true;
return (true);
}
if (!ownerAddress.empty() && ownerAddress != data.ownerAddress) {
return false;
}
auto vaultState = GetVaultState(vaultId, data);

if ((loanSchemeId.empty() || loanSchemeId == data.schemeId)
&& (ownerAddress.empty() || ownerAddress == data.ownerAddress)
&& (state == VaultState::Unknown || state == vaultState)) {
&& (state == VaultState::Unknown || state == vaultState)) {
UniValue vaultObj{UniValue::VOBJ};
if(!verbose){
vaultObj.pushKV("vaultId", vaultId.GetHex());
Expand Down Expand Up @@ -1161,7 +1163,7 @@ UniValue listauctionhistory(const JSONRPCRequest& request) {

// parse pagination
size_t limit = 100;
AuctionHistoryKey start = {~0u, {}, {}, ~0u};
AuctionHistoryKey start = {~0u};
{
if (request.params.size() > 1) {
UniValue paginationObj = request.params[1].get_obj();
Expand Down Expand Up @@ -1213,10 +1215,6 @@ UniValue listauctionhistory(const JSONRPCRequest& request) {
return true;
}

if (start.index!=~0u && start.index != key.index){
return true;
}

ret.push_back(auctionhistoryToJSON(key, valueLazy.get()));

return --limit != 0;
Expand Down
Loading