Skip to content

Commit 134a7a9

Browse files
committed
fix config usage
1 parent 7fcc9d1 commit 134a7a9

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/components/P2P/handleProtocolCommands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export async function handleProtocolCommands(stream: Stream, connection: Connect
8888
}
8989

9090
// Rate limiting and deny list checks (after reading command)
91-
const configuration = this.config
91+
const configuration = this.getConfig()
9292
const { denyList } = configuration
9393

9494
if (denyList.peers.includes(remotePeer.toString())) {

src/components/P2P/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ export class OceanP2P extends EventEmitter {
140140
return this.coreHandlers
141141
}
142142

143+
getConfig() {
144+
return this._config
145+
}
146+
143147
async start(options: any = null) {
144148
this._topic = 'oceanprotocol'
145149
this._libp2p = await this.createNode(this._config)

0 commit comments

Comments
 (0)