From 783c59d99ee594cae628446b3418d159c8dab231 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Mon, 22 Jun 2015 20:36:06 -0700 Subject: [PATCH] removed Networks.all and associated test --- lib/networks.js | 12 +----------- test/networks.js | 24 ------------------------ 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/lib/networks.js b/lib/networks.js index ba7246d..3ea7c01 100644 --- a/lib/networks.js +++ b/lib/networks.js @@ -18,15 +18,6 @@ Network.prototype.toString = function toString() { return this.name; }; -/** - * @member Networks#all - * Retrieves all networks registered. - * @return Array - */ -function all() { - return networks; -} - /** * @function * @member Networks#get @@ -181,6 +172,5 @@ module.exports = { livenet: livenet, mainnet: livenet, testnet: testnet, - get: get, - all: all + get: get }; diff --git a/test/networks.js b/test/networks.js index bd2b7b5..c3f9b8b 100644 --- a/test/networks.js +++ b/test/networks.js @@ -49,30 +49,6 @@ describe('Networks', function() { 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() { var custom = { name: 'somenet',