mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
more determinism for CompareScore* (#1017)
This commit is contained in:
parent
7f687fd696
commit
8b13d45b5c
@ -28,19 +28,19 @@ struct CompareLastPaidBlock
|
|||||||
|
|
||||||
struct CompareScoreTxIn
|
struct CompareScoreTxIn
|
||||||
{
|
{
|
||||||
bool operator()(const pair<int64_t, CTxIn>& t1,
|
bool operator()(const std::pair<int64_t, CTxIn>& t1,
|
||||||
const pair<int64_t, CTxIn>& t2) const
|
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
|
struct CompareScoreMN
|
||||||
{
|
{
|
||||||
bool operator()(const pair<int64_t, CMasternode>& t1,
|
bool operator()(const std::pair<int64_t, CMasternode>& t1,
|
||||||
const pair<int64_t, CMasternode>& t2) const
|
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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user