Skip to content

Commit

Permalink
Merge pull request #2125 from OriginTrail/v6/prerelease/testnet
Browse files Browse the repository at this point in the history
OriginTrail 6.0.0-beta.2.2.6 Testnet Release
  • Loading branch information
zeroxbt authored Oct 17, 2022
2 parents dc608df + 1238e9b commit f8d9fe2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "origintrail_node",
"version": "6.0.0-beta.2.2.5",
"version": "6.0.0-beta.2.2.6",
"description": "OTNode v6 Beta 2",
"main": "index.js",
"type": "module",
Expand Down Expand Up @@ -71,7 +71,7 @@
"@libp2p/tcp": "^3.1.2",
"@multiformats/multiaddr": "^11.0.1",
"@polkadot/api": "^9.3.2",
"@tracelabs/kad-dht": "^3.1.0",
"@tracelabs/kad-dht": "3.0.6",
"app-root-path": "^3.1.0",
"assertion-tools": "^1.0.9",
"async": "^3.2.4",
Expand Down
14 changes: 5 additions & 9 deletions src/commands/protocols/common/find-nodes-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ class FindNodesCommand extends Command {
this.errorType = errorType;
this.logger.debug(`Searching for closest node(s) for keyword ${keyword}`);

const closestNodes = [];
for (const node of await this.findNodes(keyword, operationId)) {
for (const protocol of networkProtocols) {
if (node.protocols.includes(protocol)) {
closestNodes.push({ id: node.id, protocol });
break;
}
}
}
// TODO: implement protocol selection
const closestNodes = (await this.findNodes(keyword, operationId)).map((node) => ({
id: node.id,
protocol: networkProtocols[0],
}));

this.logger.debug(`Found ${closestNodes.length} node(s) for keyword ${keyword}`);

Expand Down

0 comments on commit f8d9fe2

Please sign in to comment.