From 8b13d45b5c2921ac2c58416ce10ba3364f9001fe Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 15 Sep 2016 10:50:28 +0400 Subject: [PATCH] more determinism for CompareScore* (#1017) --- src/masternodeman.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index e223ba0ccd..3e966ef62c 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -28,19 +28,19 @@ struct CompareLastPaidBlock struct CompareScoreTxIn { - bool operator()(const pair& t1, - const pair& t2) const + bool operator()(const std::pair& t1, + const std::pair& 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& t1, - const pair& t2) const + bool operator()(const std::pair& t1, + const std::pair& t2) const { - return t1.first < t2.first; + return (t1.first != t2.first) ? (t1.first < t2.first) : (t1.second.vin < t2.second.vin); } };