Fix node units tests for _loadDB
This commit is contained in:
parent
450fb8981b
commit
af88cbe55f
|
@ -329,11 +329,11 @@ Node.prototype._loadDB = function(config) {
|
||||||
$.checkState(this.network, 'Network property not defined');
|
$.checkState(this.network, 'Network property not defined');
|
||||||
var regtest = Networks.get('regtest');
|
var regtest = Networks.get('regtest');
|
||||||
if (this.network === Networks.livenet) {
|
if (this.network === Networks.livenet) {
|
||||||
config.db.path = config.datadir + '/bitcore-node.db';
|
options.path = config.datadir + '/bitcore-node.db';
|
||||||
} else if (this.network === Networks.testnet) {
|
} else if (this.network === Networks.testnet) {
|
||||||
config.db.path = config.datadir + '/testnet3/bitcore-node.db';
|
options.path = config.datadir + '/testnet3/bitcore-node.db';
|
||||||
} else if (this.network === regtest) {
|
} else if (this.network === regtest) {
|
||||||
config.db.path = config.datadir + '/regtest/bitcore-node.db';
|
options.path = config.datadir + '/regtest/bitcore-node.db';
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Unknown network: ' + this.network);
|
throw new Error('Unknown network: ' + this.network);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue