diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-03-21 12:50:09 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-03-21 12:50:47 +0100 |
| commit | 3c27067dd2db4c17e7c7c48b4e6db515492559ce (patch) | |
| tree | e92deb09b247e0fd5891e61ff427fc71503894f4 /src/primitives | |
| parent | Merge #7720: [qa] rpc-test: Normalize assert() (diff) | |
| parent | Improve COutPoint less operator (diff) | |
| download | discoin-3c27067dd2db4c17e7c7c48b4e6db515492559ce.tar.xz discoin-3c27067dd2db4c17e7c7c48b4e6db515492559ce.zip | |
Merge #7712: Improve COutPoint less operator
0f17692 Improve COutPoint less operator (João Barbosa)
Diffstat (limited to 'src/primitives')
| -rw-r--r-- | src/primitives/transaction.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 07ae39e0b..e124dca36 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -34,7 +34,8 @@ public: friend bool operator<(const COutPoint& a, const COutPoint& b) { - return (a.hash < b.hash || (a.hash == b.hash && a.n < b.n)); + int cmp = a.hash.Compare(b.hash); + return cmp < 0 || (cmp == 0 && a.n < b.n); } friend bool operator==(const COutPoint& a, const COutPoint& b) |