diff --git a/libp2p/crypto/crypto.nim b/libp2p/crypto/crypto.nim index 49416d504..c88437a50 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