Skip to content

Commit

Permalink
Revert "Test add missing tests + fix index filtering listauctionhisto…
Browse files Browse the repository at this point in the history
…ry (#1215)"

This reverts commit a47808b.
  • Loading branch information
prasannavl authored Jun 6, 2022
1 parent ecc0a3b commit a063c82
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 461 deletions.
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

0 comments on commit a063c82

Please sign in to comment.