diff --git a/bin/cli.js b/bin/cli.js index 829cae5..4eed8b3 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -38,7 +38,7 @@ const args = require('yargs') }, 'transports': { describe: 'Network transports', - default: ['rlpx:port=30303'], + default: ['rlpx:port=30303', 'libp2p'], array: true }, 'rpc': { diff --git a/browser/index.js b/browser/index.js index f265288..f69c909 100644 --- a/browser/index.js +++ b/browser/index.js @@ -52,8 +52,8 @@ exports.logging = require('./logging') exports.createNode = function (args) { const logger = exports.logging.getLogger({loglevel: args.loglevel}) const options = { - common: new Common(args.network), - servers: [new exports.Libp2pServer(args)], + common: new Common(args.network || 'mainnet'), + servers: [new exports.Libp2pServer({ multiaddrs: [], ...args })], syncmode: args.syncmode || 'fast', db: level(args.db || 'ethereumjs'), logger: logger diff --git a/lib/net/server/libp2pserver.js b/lib/net/server/libp2pserver.js index 6f36cc3..93f97b2 100644 --- a/lib/net/server/libp2pserver.js +++ b/lib/net/server/libp2pserver.js @@ -7,7 +7,7 @@ const Libp2pNode = require('../peer/libp2pnode') const Libp2pPeer = require('../peer/libp2ppeer') const defaultOptions = { - multiaddrs: '/ip4/0.0.0.0/tcp/50505', + multiaddrs: [ '/ip4/127.0.0.1/tcp/50505', '/ip4/127.0.0.1/tcp/50580/ws' ], key: null, bootnodes: [] }