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

Add fields to getgovproposal #1583

Merged
merged 30 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8dcc5b6
Renames contexthash->currentHash
dcorral Nov 17, 2022
c3e28c7
Renames nextCycle->currentCycle
dcorral Nov 17, 2022
ba19e76
Renames finalizeAfter->endHeight
dcorral Nov 17, 2022
c2503e8
Fixes typo currentHash->contextHash
dcorral Nov 17, 2022
b9d4ae5
Renames endHeight->proposalEndHeight
dcorral Nov 17, 2022
ae8eea7
Merge branch 'master' of github.com:DeFiCh/ain into fix/proposal-govv…
dcorral Nov 17, 2022
7e2f1bb
Adds cycleEndHeight to listgovproposals
dcorral Nov 17, 2022
4304202
Fix lint error remove unnecessary include
dcorral Nov 17, 2022
ce747ec
Merge branch 'master' into fix/proposal-govvar-changes
dcorral Nov 17, 2022
b633c4b
Update test/functional/feature_on_chain_government.py
dcorral Nov 17, 2022
8542986
Update src/masternodes/proposals.cpp
dcorral Nov 17, 2022
68e5ed9
Rename approval->votes and fix tests
dcorral Nov 17, 2022
882818f
Merge branch 'master' into fix/proposal-govvar-changes
prasannavl Nov 17, 2022
ff7ce75
Merge branch 'master' into fix/proposal-govvar-changes
prasannavl Nov 17, 2022
15863f7
Add missing fields in getgovproposal and remove ends fields
dcorral Nov 17, 2022
2ba97a8
Add missing fields to getgovproposal
dcorral Nov 17, 2022
da44b74
Merge branch 'master' into fix/add-fields-getgovproposal
dcorral Nov 17, 2022
0683181
Use approvalThreshold and quorum from attributes
dcorral Nov 21, 2022
46371b0
Merge branch 'master' into fix/add-fields-getgovproposal
dcorral Nov 21, 2022
c35ca96
GetQuorumFromAttributes handles VOCEmergencyQuorum
Jouzo Nov 21, 2022
39723b6
Adds cycle parameter to listgovproposals
dcorral Nov 21, 2022
8fff643
Clean tests, fix quorum value checking
dcorral Nov 22, 2022
4c339fe
Adds cycle to listgovvotes
dcorral Nov 22, 2022
89373e2
Fix lint error
dcorral Nov 22, 2022
4bf2935
Add param checks for cycle in listgovvote
dcorral Nov 22, 2022
ebfdb2c
Merge branch 'master' into fix/add-fields-getgovproposal
prasannavl Nov 22, 2022
f47700e
Remove unnided param cycle from client.cpp to fix lint
dcorral Nov 22, 2022
0f9b64c
Adds functional test
dcorral Nov 22, 2022
8d71edb
Renames listgovvotes to listgovproposalvotes
dcorral Nov 22, 2022
cc8e476
Restore cycle check in client.cpp
dcorral Nov 22, 2022
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
Prev Previous commit
Next Next commit
Add param checks for cycle in listgovvote
  • Loading branch information
dcorral committed Nov 22, 2022
commit 4bf2935a70b92306f9e5a06486e9aa2687a5b741
4 changes: 2 additions & 2 deletions src/masternodes/rpc_proposals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ UniValue listgovvotes(const JSONRPCRequest& request)
},
}.Check(request);

RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VSTR}, true);
RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VSTR, UniValue::VNUM}, true);

auto propId = ParseHashV(request.params[0].get_str(), "proposalId");

Expand Down Expand Up @@ -686,7 +686,7 @@ static const CRPCCommand commands[] =
{"proposals", "creategovcfp", &creategovcfp, {"data", "inputs"} },
{"proposals", "creategovvoc", &creategovvoc, {"data", "inputs"} },
{"proposals", "votegov", &votegov, {"proposalId", "masternodeId", "decision", "inputs"} },
{"proposals", "listgovvotes", &listgovvotes, {"proposalId", "masternode"} },
{"proposals", "listgovvotes", &listgovvotes, {"proposalId", "masternode", "cycle"} },
{"proposals", "getgovproposal", &getgovproposal, {"proposalId"} },
{"proposals", "listgovproposals", &listgovproposals, {"type", "status"} },
};
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "creategovcfp", 1, "inputs" },
{ "creategovvoc", 0, "data" },
{ "creategovvoc", 1, "inputs" },
{ "votegov", 3, "inputs" },
{ "listgovvotes", 2, "cycle" }
};
// clang-format on

Expand Down