diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp index 89e9ec69c18f1..160d808daa7c2 100644 --- a/src/masternode-budget.cpp +++ b/src/masternode-budget.cpp @@ -844,10 +844,13 @@ std::vector CBudgetManager::GetBudget() return vBudgetProposalsRet; } +// Sort by votes, if there's a tie sort by their feeHash TX struct sortFinalizedBudgetsByVotes { bool operator()(const std::pair& left, const std::pair& right) { - return left.second > right.second; + if (left.second != right.second) + return left.second > right.second; + return (left.first->nFeeTXHash > right.first->nFeeTXHash); } };