We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ca92ba commit 4b0df76Copy full SHA for 4b0df76
packages/client/lib/net/server/rlpxserver.ts
@@ -2,7 +2,7 @@ import { randomBytes } from 'crypto'
2
import { RLPx as Devp2pRLPx, Peer as Devp2pRLPxPeer, DPT as Devp2pDPT } from '@ethereumjs/devp2p'
3
import { RlpxPeer } from '../peer/rlpxpeer'
4
import { Server, ServerOptions } from './server'
5
-import fs from 'fs'
+const fs = require('fs-extra')
6
7
export interface RlpxServerOptions extends ServerOptions {
8
/* Local port to listen on (default: 30303) */
@@ -60,6 +60,7 @@ export class RlpxServer extends Server {
60
} else {
61
const key = randomBytes(32)
62
this.key = key
63
+ fs.ensureDirSync(dataDir)
64
fs.writeFileSync(fileName, key.toString('binary'), {
65
encoding: 'binary',
66
})
0 commit comments