From 96c04d0787d65bf846d9a4b70d194386cbb9be11 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Mon, 24 Aug 2015 01:03:54 +1000 Subject: [PATCH] ECPair: makeRandom, fix comparison --- src/ecpair.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ecpair.js b/src/ecpair.js index 432ad69..3d459e4 100644 --- a/src/ecpair.js +++ b/src/ecpair.js @@ -112,7 +112,7 @@ ECPair.makeRandom = function (options) { typeforce(types.Buffer256bit, buffer) d = BigInteger.fromBuffer(buffer) - } while (d.compareTo(secp256k1.n) > 0) + } while (d.compareTo(secp256k1.n) >= 0) return new ECPair(d, null, options) }