Skip to content

Commit

Permalink
pkg: remove bn.js dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Aug 10, 2018
1 parent 85ed59c commit f10d7b8
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/blockchain/chainentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

const assert = require('bsert');
const bio = require('bufio');
const BN = require('bn.js');
const BN = require('bcrypto/lib/bn.js');
const consensus = require('../protocol/consensus');
const hash256 = require('bcrypto/lib/hash256');
const util = require('../utils/util');
Expand Down
2 changes: 1 addition & 1 deletion lib/mining/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

const assert = require('bsert');
const consensus = require('../protocol/consensus');
const BN = require('bn.js');
const BN = require('bcrypto/lib/bn.js');

/**
* @exports mining/common
Expand Down
2 changes: 1 addition & 1 deletion lib/protocol/consensus.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

const assert = require('bsert');
const BN = require('bn.js');
const BN = require('bcrypto/lib/bn.js');

/**
* One bitcoin in satoshis.
Expand Down
2 changes: 1 addition & 1 deletion lib/protocol/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @module protocol/networks
*/

const BN = require('bn.js');
const BN = require('bcrypto/lib/bn.js');

const network = exports;

Expand Down
2 changes: 1 addition & 1 deletion migrate/chaindb2to3.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (process.argv.indexOf('-h') !== -1
const assert = require('assert');
const bdb = require('bdb');
const hash256 = require('bcrypto/lib/hash256');
const BN = require('bn.js');
const BN = require('bcrypto/lib/bn.js');
const bio = require('bufio');
const LRU = require('blru');
const {BufferMap} = require('buffer-map');
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"blru": "~0.1.2",
"blst": "~0.1.1",
"bmutex": "~0.1.2",
"bn.js": "~4.11.8",
"bsert": "~0.0.4",
"bsip": "~0.1.1",
"bsock": "~0.1.2",
Expand Down
2 changes: 1 addition & 1 deletion test/consensus-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

const assert = require('./util/assert');
const consensus = require('../lib/protocol/consensus');
const BN = require('bn.js');
const BN = require('bcrypto/lib/bn.js');

describe('Consensus', function() {
it('should calculate reward properly', () => {
Expand Down

0 comments on commit f10d7b8

Please sign in to comment.