Fix bug with loading the genesis block for testnet.

This commit is contained in:
Braydon Fuller 2015-07-22 23:36:23 -04:00
parent 747942cec1
commit 509b424262
2 changed files with 2 additions and 2 deletions

View File

@ -209,7 +209,7 @@ Node.prototype._loadConsensus = function(config) {
var genesisBlock;
if (config.genesis) {
genesisBlock = config.genesis;
} else if (config.testnet) {
} else if (config.network === 'testnet') {
genesisBlock = genesis.testnet;
} else {
genesisBlock = genesis.livenet;

View File

@ -309,7 +309,7 @@ describe('Bitcoind Node', function() {
});
it('should use the testnet genesis if testnet is specified', function() {
var config = {
testnet: true
network: 'testnet'
};
node._loadConsensus(config);
should.exist(node.chain);