let x = new BN(9000000000);
assert.equal(x.gten(100000000000), false); // error!
I've checked cmpn function and it seems that it's the source of the problem because x.cmpn(100000000000) returns 1 which means that A (9000000000) > B (100000000000)
This works fine
let x = new BN(9000000000);
assert.equal(x.gte(new BN(100000000000)), false); // ok
Version:
5.2.0
Node version:v17.5.0
I've checked
cmpn
function and it seems that it's the source of the problem becausex.cmpn(100000000000)
returns 1 which means that A (9000000000) > B (100000000000)This works fine