|
|
@ -2,6 +2,7 @@ |
|
|
|
var _ = require('lodash'); |
|
|
|
|
|
|
|
var BufferUtil = require('./util/buffer'); |
|
|
|
var JSUtil = require('./util/js'); |
|
|
|
var networks = []; |
|
|
|
var networkMaps = {}; |
|
|
|
|
|
|
@ -64,7 +65,7 @@ function addNetwork(data) { |
|
|
|
|
|
|
|
var network = new Network(); |
|
|
|
|
|
|
|
_.extend(network, { |
|
|
|
JSUtil.defineImmutable(network, { |
|
|
|
name: data.name, |
|
|
|
alias: data.alias, |
|
|
|
pubkeyhash: data.pubkeyhash, |
|
|
@ -77,7 +78,7 @@ function addNetwork(data) { |
|
|
|
dnsSeeds: data.dnsSeeds |
|
|
|
}); |
|
|
|
|
|
|
|
_.each(_.values(network), function(value) { |
|
|
|
_.each(network, function(value) { |
|
|
|
if (!_.isUndefined(value) && !_.isObject(value)) { |
|
|
|
networkMaps[value] = network; |
|
|
|
} |
|
|
|