From e75e040d2be2f5a95b258cc0c6a17670544c61bb Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 15 May 2016 17:43:51 -0700 Subject: [PATCH] remove comments. --- lib/bcoin/utils.js | 5 ----- test/utils-test.js | 14 -------------- 2 files changed, 19 deletions(-) diff --git a/lib/bcoin/utils.js b/lib/bcoin/utils.js index 3f56af23..22473117 100644 --- a/lib/bcoin/utils.js +++ b/lib/bcoin/utils.js @@ -671,8 +671,6 @@ utils.btc = function btc(value) { assert(value <= utils.MAX_SAFE_INTEGER, 'Number exceeds 2^53-1.'); - // assert(value <= 21000000 * 100000000, 'Number exceeds MAX_MONEY.'); - value = value.toString(10); assert(value.length <= 16, 'Number exceeds 2^53-1.'); @@ -746,9 +744,6 @@ utils.satoshi = function satoshi(value) { assert(hi < 90071992 || (hi === 90071992 && lo <= 54740991), 'Number exceeds 2^53-1.'); - // assert(hi < 21000000 || (hi === 21000000 && lo === 0), - // 'Number exceeds MAX_MONEY.'); - result = hi * 100000000 + lo; if (negative) diff --git a/test/utils-test.js b/test/utils-test.js index 5ba9b470..f3fc1f9e 100644 --- a/test/utils-test.js +++ b/test/utils-test.js @@ -47,20 +47,6 @@ describe('Utils', function() { assert.throws(function() { utils.satoshi('546.00000000000000001'); }); - /* - assert.doesNotThrow(function() { - utils.satoshi('21000000'); - }); - assert.doesNotThrow(function() { - utils.satoshi('021000000'); - }); - assert.throws(function() { - utils.satoshi('21000001'); - }); - assert.throws(function() { - utils.satoshi('121000000'); - }); - */ assert.doesNotThrow(function() { utils.satoshi('90071992.54740991'); });