From 54f9a5be7c6d0d9146a4bf424ddd21388de7afdc Mon Sep 17 00:00:00 2001 From: cheatfate Date: Thu, 12 Sep 2019 23:11:50 +0300 Subject: [PATCH] Fix getOrder() bug. --- libp2p/crypto/crypto.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/crypto/crypto.nim b/libp2p/crypto/crypto.nim index 49416d5..c88437a 100644 --- a/libp2p/crypto/crypto.nim +++ b/libp2p/crypto/crypto.nim @@ -620,7 +620,7 @@ proc getOrder*(remotePubkey, localNonce: openarray[byte], for i in 0 ..< len(mh1.data.buffer): result = int(mh1.data.buffer[i]) - int(mh2.data.buffer[i]) if result != 0: - if result > 0: + if result < 0: result = -1 elif result > 0: result = 1