Skip to content

Commit

Permalink
quiet logging of error
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottyPoi committed Aug 22, 2023
1 parent 160c2f2 commit 7df4843
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/portalnetwork/src/subprotocols/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export abstract class BaseProtocol extends EventEmitter {
* @returns a {@link `NodesMessage`} or undefined
*/
public sendFindNodes = async (dstId: string, distances: number[]) => {
if (!this.routingTable) {
if (this.routingTable === undefined) {
return
}
this.metrics?.findNodesMessagesSent.inc()
Expand All @@ -220,7 +220,8 @@ export abstract class BaseProtocol extends EventEmitter {
? this.routingTable.getWithPending(dstId)!.value
: this.routingTable.getValue(dstId)
} catch (err: any) {
this.logger(`Error decoding ENR: ${err.message}`)
// TODO: Find source of "cannot read properties of undefined (reading 'getWithPending')" error
// this.logger(`Error decoding ENR: ${err.message}`)
}
if (!enr) {
return
Expand Down

0 comments on commit 7df4843

Please sign in to comment.