@@ -812,49 +812,6 @@ UniValue gobject_get(const JSONRPCRequest& request)
812
812
return objResult;
813
813
}
814
814
815
- void gobject_getvotes_help ()
816
- {
817
- throw std::runtime_error (
818
- " gobject getvotes <governance-hash>\n "
819
- " Get all votes for a governance object hash (including old votes)\n "
820
- " \n Arguments:\n "
821
- " 1. governance-hash (string, required) object id\n "
822
- );
823
- }
824
-
825
- UniValue gobject_getvotes (const JSONRPCRequest& request)
826
- {
827
- if (request.fHelp || request.params .size () != 2 )
828
- gobject_getvotes_help ();
829
-
830
- // COLLECT PARAMETERS FROM USER
831
-
832
- uint256 hash = ParseHashV (request.params [1 ], " Governance hash" );
833
-
834
- // FIND OBJECT USER IS LOOKING FOR
835
-
836
- LOCK (governance.cs );
837
-
838
- CGovernanceObject* pGovObj = governance.FindGovernanceObject (hash);
839
-
840
- if (pGovObj == nullptr ) {
841
- throw JSONRPCError (RPC_INVALID_PARAMETER, " Unknown governance-hash" );
842
- }
843
-
844
- // REPORT RESULTS TO USER
845
-
846
- UniValue bResult (UniValue::VOBJ);
847
-
848
- // GET MATCHING VOTES BY HASH, THEN SHOW USERS VOTE INFORMATION
849
-
850
- std::vector<CGovernanceVote> vecVotes = governance.GetMatchingVotes (hash);
851
- for (const auto & vote : vecVotes) {
852
- bResult.push_back (Pair (vote.GetHash ().ToString (), vote.ToString ()));
853
- }
854
-
855
- return bResult;
856
- }
857
-
858
815
void gobject_getcurrentvotes_help ()
859
816
{
860
817
throw std::runtime_error (
@@ -921,7 +878,6 @@ UniValue gobject_getcurrentvotes(const JSONRPCRequest& request)
921
878
" deserialize - Deserialize governance object from hex string to JSON\n "
922
879
" count - Count governance objects and votes (additional param: 'json' or 'all', default: 'json')\n "
923
880
" get - Get governance object by hash\n "
924
- " getvotes - Get all votes for a governance object hash (including old votes)\n "
925
881
" getcurrentvotes - Get only current (tallying) votes for a governance object hash (does not include old votes)\n "
926
882
" list - List governance objects (can be filtered by signal and/or object type)\n "
927
883
" diff - List differences since last diff\n "
@@ -978,11 +934,8 @@ UniValue gobject(const JSONRPCRequest& request)
978
934
} else if (strCommand == " get" ) {
979
935
// GET SPECIFIC GOVERNANCE ENTRY
980
936
return gobject_get (request);
981
- } else if (strCommand == " getvotes" ) {
982
- // GETVOTES FOR SPECIFIC GOVERNANCE OBJECT
983
- return gobject_getvotes (request);
984
937
} else if (strCommand == " getcurrentvotes" ) {
985
- // GETVOTES FOR SPECIFIC GOVERNANCE OBJECT
938
+ // GET VOTES FOR SPECIFIC GOVERNANCE OBJECT
986
939
return gobject_getcurrentvotes (request);
987
940
} else {
988
941
gobject_help ();
0 commit comments