aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/tx_pool.h')
-rw-r--r--src/cryptonote_core/tx_pool.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h
index 3bb96d3a8..3a111ce91 100644
--- a/src/cryptonote_core/tx_pool.h
+++ b/src/cryptonote_core/tx_pool.h
@@ -69,11 +69,12 @@ namespace cryptonote
{
// sort by greatest first, not least
if (a.first.first > b.first.first) return true;
- else if (a.first.first < b.first.first) return false;
- else if (a.first.second < b.first.second) return true;
- else if (a.first.second > b.first.second) return false;
- else if (a.second != b.second) return true;
- else return false;
+ if (a.first.first < b.first.first) return false;
+
+ if (a.first.second < b.first.second) return true;
+ if (a.first.second > b.first.second) return false;
+
+ return memcmp(a.second.data, b.second.data, sizeof(crypto::hash)) < 0;
}
};