You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While completing #311 it was discovered that failed node connections created by the Discovery domain (using NodeManager.requestChainData() to get the sigchain data of a node during the discovery process) were not handled correctly, leading to strange errors during testing. A quick fix for handling these errors was implemented, however it could be refactored to be more specific.
Currently we have (inside src/discovery/Discovery.ts):
// Lines 234-246 (requesting chain data from a node in the discovery queue)try{vertexChainData=awaitthis.nodeManager.requestChainData(nodeId,);}catch(e){this.visitedVertices.add(vertex);awaitthis.removeKeyFromDiscoveryQueue(vertexId);this.logger.error(`Failed to discover ${vertexGId.nodeId} - ${e.toString()}`,);yield;continue;}// Lines 281-302 (requesting chain data from a node that is linked to a node in the discovery queue)try{linkedVertexChainData=awaitthis.nodeManager.requestChainData(linkedVertexNodeId);}catch(e){if(einstanceofnodesErrors.ErrorNodeConnectionDestroyed||einstanceofnodesErrors.ErrorNodeConnectionTimeout){if(!this.visitedVertices.has(linkedVertexGK)){awaitthis.pushKeyToDiscoveryQueue(linkedVertexGK);}this.logger.error(`Failed to discover ${nodesUtils.encodeNodeId(linkedVertexNodeId,)} - ${e.toString()}`,);yield;continue;}else{throwe;}}// Lines 367-387 (requesting chain data from a node that is linked to an identity in the discovery queue)try{linkedVertexChainData=awaitthis.nodeManager.requestChainData(linkedVertexNodeId,);}catch(e){if(einstanceofnodesErrors.ErrorNodeConnectionDestroyed||einstanceofnodesErrors.ErrorNodeConnectionTimeout){if(!this.visitedVertices.has(linkedVertexGK)){awaitthis.pushKeyToDiscoveryQueue(linkedVertexGK);}yield;this.logger.error(`Failed to discover ${data.node} - ${e.toString()}`,);continue;}else{throwe;}}
Specification
While completing #311 it was discovered that failed node connections created by the Discovery domain (using
NodeManager.requestChainData()
to get the sigchain data of a node during the discovery process) were not handled correctly, leading to strange errors during testing. A quick fix for handling these errors was implemented, however it could be refactored to be more specific.Currently we have (inside
src/discovery/Discovery.ts
):Additional context
Tasks
ErrorNodeConnectionDestroyed
,ErrorNodeConnectionTimeout
, and any other errors found while working through Write tests to cover all possible states of the Discovery, NodeConnection, and discovered Node during the discovery process #349)The text was updated successfully, but these errors were encountered: