Skip to content

Commit

Permalink
Client: use client version for RLPx initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerd77 committed Feb 20, 2023
1 parent e6fa5cd commit c4b4529
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/client/lib/net/server/rlpxserver.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DPT as Devp2pDPT, RLPx as Devp2pRLPx } from '@ethereumjs/devp2p'

import { Event } from '../../types'
import { getClientVersion } from '../../util'
import { RlpxPeer } from '../peer/rlpxpeer'

import { Server } from './server'
Expand Down Expand Up @@ -238,6 +239,7 @@ export class RlpxServer extends Server {
private async initRlpx() {
return new Promise<void>((resolve) => {
this.rlpx = new Devp2pRLPx(this.key, {
clientId: Buffer.from(getClientVersion()),
dpt: this.dpt!,
maxPeers: this.config.maxPeers,
capabilities: RlpxPeer.capabilities(Array.from(this.protocols)),
Expand Down

0 comments on commit c4b4529

Please sign in to comment.