Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Update libp2p defaults #63

Merged
merged 1 commit into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const args = require('yargs')
},
'transports': {
describe: 'Network transports',
default: ['rlpx:port=30303'],
default: ['rlpx:port=30303', 'libp2p'],
array: true
},
'rpc': {
Expand Down
4 changes: 2 additions & 2 deletions browser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/net/server/libp2pserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
}
Expand Down