removed Networks.all and associated test
This commit is contained in:
parent
e07186df07
commit
783c59d99e
|
@ -18,15 +18,6 @@ Network.prototype.toString = function toString() {
|
||||||
return this.name;
|
return this.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* @member Networks#all
|
|
||||||
* Retrieves all networks registered.
|
|
||||||
* @return Array
|
|
||||||
*/
|
|
||||||
function all() {
|
|
||||||
return networks;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @function
|
* @function
|
||||||
* @member Networks#get
|
* @member Networks#get
|
||||||
|
@ -181,6 +172,5 @@ module.exports = {
|
||||||
livenet: livenet,
|
livenet: livenet,
|
||||||
mainnet: livenet,
|
mainnet: livenet,
|
||||||
testnet: testnet,
|
testnet: testnet,
|
||||||
get: get,
|
get: get
|
||||||
all: all
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,30 +49,6 @@ describe('Networks', function() {
|
||||||
should.equal(net, undefined);
|
should.equal(net, undefined);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can return custom networks', function() {
|
|
||||||
var custom = {
|
|
||||||
name: 'customnet',
|
|
||||||
alias: 'mynet',
|
|
||||||
pubkeyhash: 0x10,
|
|
||||||
privatekey: 0x90,
|
|
||||||
scripthash: 0x08,
|
|
||||||
xpubkey: 0x0278b20e,
|
|
||||||
xprivkey: 0x0278ade4,
|
|
||||||
networkMagic: 0xe7beb4d4,
|
|
||||||
port: 20001,
|
|
||||||
dnsSeeds: [
|
|
||||||
'localhost',
|
|
||||||
'mynet.localhost'
|
|
||||||
]
|
|
||||||
};
|
|
||||||
networks.add(custom);
|
|
||||||
customnet = networks.get('customnet');
|
|
||||||
var allNetworks = networks.all();
|
|
||||||
var customInOutput = allNetworks.indexOf(customnet) > -1;
|
|
||||||
should.equal(customInOutput, true);
|
|
||||||
networks.remove(customnet);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should not set a network map for an undefined value', function() {
|
it('should not set a network map for an undefined value', function() {
|
||||||
var custom = {
|
var custom = {
|
||||||
name: 'somenet',
|
name: 'somenet',
|
||||||
|
|
Loading…
Reference in New Issue