Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: fix config object issue #694

Merged
merged 4 commits into from
Dec 18, 2024
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: 2 additions & 0 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const main = async () => {

const portal = await PortalNetwork.create(portalConfig)

log(`discv5Config: ${JSON.stringify(portal.discv5['config'], null, 2)}`)

const rpcAddr = args.rpcAddr ?? ip // Set RPC address (used by metrics server and rpc server)
let metricsServer: http.Server | undefined

Expand Down
2 changes: 2 additions & 0 deletions packages/portalnetwork/src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export class PortalNetwork extends (EventEmitter as { new (): PortalNetworkEvent
},
}
const config = { ...defaultConfig, ...opts.config }
config.config = { ...defaultConfig.config, ...opts.config?.config }
let bootnodes = opts.bootnodes
if (opts.rebuildFromMemory === true && opts.db) {
const prevEnrString = await opts.db.get('enr')
Expand Down Expand Up @@ -142,6 +143,7 @@ export class PortalNetwork extends (EventEmitter as { new (): PortalNetworkEvent
eventLog: opts.eventLog,
utpTimeout: opts.utpTimeout,
gossipCount: opts.gossipCount,
shouldRefresh: opts.shouldRefresh,
})
for (const network of portal.networks.values()) {
try {
Expand Down
Loading