more determinism for CompareScore* (#1017)

This commit is contained in:
UdjinM6 2016-09-15 10:50:28 +04:00 committed by GitHub
parent 7f687fd696
commit 8b13d45b5c

View File

@ -28,19 +28,19 @@ struct CompareLastPaidBlock
struct CompareScoreTxIn
{
bool operator()(const pair<int64_t, CTxIn>& t1,
const pair<int64_t, CTxIn>& t2) const
bool operator()(const std::pair<int64_t, CTxIn>& t1,
const std::pair<int64_t, CTxIn>& t2) const
{
return t1.first < t2.first;
return (t1.first != t2.first) ? (t1.first < t2.first) : (t1.second < t2.second);
}
};
struct CompareScoreMN
{
bool operator()(const pair<int64_t, CMasternode>& t1,
const pair<int64_t, CMasternode>& t2) const
bool operator()(const std::pair<int64_t, CMasternode>& t1,
const std::pair<int64_t, CMasternode>& t2) const
{
return t1.first < t2.first;
return (t1.first != t2.first) ? (t1.first < t2.first) : (t1.second.vin < t2.second.vin);
}
};