diff --git a/benchmarks/index.js b/benchmarks/index.js index 436ccabf..e41c43a6 100644 --- a/benchmarks/index.js +++ b/benchmarks/index.js @@ -27,7 +27,7 @@ var fixtureData = { }; var bitcoind = require('../').daemon({ - datadir: process.env.BITCOINDJS_DIR || '~/.bitcoin', + datadir: process.env.BITCORENODE_DIR || '~/.bitcoin', network: 'testnet' }); diff --git a/lib/node.js b/lib/node.js index 00a929bd..42d0cf4b 100644 --- a/lib/node.js +++ b/lib/node.js @@ -304,11 +304,11 @@ Node.prototype._loadDB = function(config) { var regtest = Networks.get('regtest'); var datadir = config.datadir.replace(/^~/, process.env.HOME); if (this.network === Networks.livenet) { - config.db.path = datadir + '/bitcoindjs.db'; + config.db.path = datadir + '/bitcore-node.db'; } else if (this.network === Networks.testnet) { - config.db.path = datadir + '/testnet3/bitcoindjs.db'; + config.db.path = datadir + '/testnet3/bitcore-node.db'; } else if (this.network === regtest) { - config.db.path = datadir + '/regtest/bitcoindjs.db'; + config.db.path = datadir + '/regtest/bitcore-node.db'; } else { throw new Error('Unknown network: ' + this.network); } diff --git a/test/node.unit.js b/test/node.unit.js index 2417f1dc..f65d796f 100644 --- a/test/node.unit.js +++ b/test/node.unit.js @@ -247,7 +247,7 @@ describe('Bitcoind Node', function() { describe('#_loadDB', function() { it('should load the db', function() { var DB = function(config) { - config.path.should.equal(process.env.HOME + '/.bitcoin/bitcoindjs.db'); + config.path.should.equal(process.env.HOME + '/.bitcoin/bitcore-node.db'); }; var config = { DB: DB, @@ -261,7 +261,7 @@ describe('Bitcoind Node', function() { }); it('should load the db for testnet', function() { var DB = function(config) { - config.path.should.equal(process.env.HOME + '/.bitcoin/testnet3/bitcoindjs.db'); + config.path.should.equal(process.env.HOME + '/.bitcoin/testnet3/bitcore-node.db'); }; var config = { DB: DB, @@ -286,7 +286,7 @@ describe('Bitcoind Node', function() { }); it('should load the db with regtest', function() { var DB = function(config) { - config.path.should.equal(process.env.HOME + '/.bitcoin/regtest/bitcoindjs.db'); + config.path.should.equal(process.env.HOME + '/.bitcoin/regtest/bitcore-node.db'); }; var config = { DB: DB, @@ -381,7 +381,7 @@ describe('Bitcoind Node', function() { node._initializeBitcoind(); node.bitcoind.emit('ready'); }); - it('will call emit an error from bitcoind.js', function(done) { + it('will call emit an error from libbitcoind', function(done) { var node = new Node({}); node.bitcoind = new EventEmitter(); node.on('error', function(err) {