Skip to content

Commit

Permalink
Pagination nesting as in #1635
Browse files Browse the repository at this point in the history
Co-authored-by: Jouzo <15011228+Jouzo@users.noreply.github.com>
  • Loading branch information
Mixa84 and Jouzo authored Dec 30, 2022
1 parent 2f7e71f commit 4b27d28
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/masternodes/rpc_proposals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,16 +706,19 @@ UniValue listgovproposals(const JSONRPCRequest &request) {
}
}

if (!optionsObj["limit"].isNull()) {
limit = (size_t)optionsObj["limit"].get_int64();
}
if (!optionsObj["start"].isNull()) {
including_start = false;
start = ParseHashV(optionsObj["start"], "start");
}
if (!optionsObj["including_start"].isNull()) {
including_start = optionsObj["including_start"].getBool();
}
if (!optionsObj["pagination"].isNull()) {
UniValue paginationObj = optionsObj["pagination"].get_obj();
if (!paginationObj["limit"].isNull()) {
limit = (size_t)paginationObj["limit"].get_int64();
}
if (!paginationObj["start"].isNull()) {
including_start = false;
start = ParseHashV(optionsObj["start"], "start");
}
if (!paginationObj["including_start"].isNull()) {
including_start = paginationObj["including_start"].getBool();
}
}
} else {
if (request.params.size() > 0) {
auto str = request.params[0].get_str();
Expand Down

0 comments on commit 4b27d28

Please sign in to comment.