diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp index 2f3a198c4..64635318c 100644 --- a/src/masternode-budget.cpp +++ b/src/masternode-budget.cpp @@ -534,7 +534,7 @@ CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName { //find the prop with the highest yes count - int nYesCount = 0; + int nYesCount = -99999; CBudgetProposal* prop = NULL; std::map::iterator it = mapProposals.begin(); @@ -546,7 +546,7 @@ CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName ++it; } - if(nYesCount == 0) return NULL; + if(nYesCount == -99999) return NULL; return prop; } diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp index d3fa3160b..f96c9e722 100644 --- a/src/rpcmasternode-budget.cpp +++ b/src/rpcmasternode-budget.cpp @@ -332,6 +332,7 @@ Value mnbudget(const Array& params, bool fHelp) CBitcoinAddress address2(address1); Object obj; + obj.push_back(Pair("VoteCommand", prop->GetVoteCommand().c_str())); obj.push_back(Pair("Name", prop->GetName().c_str())); obj.push_back(Pair("Hash", prop->GetHash().ToString().c_str())); obj.push_back(Pair("URL", prop->GetURL().c_str())); @@ -346,6 +347,15 @@ Value mnbudget(const Array& params, bool fHelp) obj.push_back(Pair("Abstains", (int64_t)prop->GetAbstains())); obj.push_back(Pair("Alloted", (int64_t)prop->GetAllotted())); + std::string strError = ""; + obj.push_back(Pair("IsValid", prop->IsValid(strError))); + obj.push_back(Pair("Owner", prop->vin.prevout.ToStringShort().c_str())); + + if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) { + obj.push_back(Pair("SignatureValid", mapSeenMasternodeBudgetProposals[prop->GetHash()].SignatureValid())); + } + + return obj; }