simplify CGovernanceObject::GetAbsolute*Count (#1026)

This commit is contained in:
UdjinM6 2016-09-16 19:30:33 +04:00 committed by GitHub
parent 19ae48a02e
commit 49fb3df3e3

View File

@ -1110,12 +1110,12 @@ bool CGovernanceObject::IsCollateralValid(std::string& strError)
int CGovernanceObject::GetAbsoluteYesCount(vote_signal_enum_t eVoteSignalIn)
{
return governance.CountMatchingVotes((*this), eVoteSignalIn, VOTE_OUTCOME_YES) - governance.CountMatchingVotes((*this), eVoteSignalIn, VOTE_OUTCOME_NO);
return GetYesCount(eVoteSignalIn) - GetNoCount(eVoteSignalIn);
}
int CGovernanceObject::GetAbsoluteNoCount(vote_signal_enum_t eVoteSignalIn)
{
return governance.CountMatchingVotes((*this), eVoteSignalIn, VOTE_OUTCOME_NO) - governance.CountMatchingVotes((*this), eVoteSignalIn, VOTE_OUTCOME_YES);
return GetNoCount(eVoteSignalIn) - GetYesCount(eVoteSignalIn);
}
int CGovernanceObject::GetYesCount(vote_signal_enum_t eVoteSignalIn)