Skip to content

Commit

Permalink
# optimized performance for growing network
Browse files Browse the repository at this point in the history
  • Loading branch information
Benny committed Oct 29, 2024
1 parent e25cb66 commit 9b170ec
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/TracManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,15 @@ export default class TracManager {
peerInfo.ban(true);
console.log('Replication denied', connection.remotePublicKey.toString("hex"));
} else {
console.log(
"Connected to peer:",
connection.remotePublicKey.toString("hex")
);

if(_this.repCount < 12)
{
_this.core.replicate(connection);
_this.reps[connection.remotePublicKey.toString("hex")] = true;
_this.repCount += 1;
console.log(
"Connected to peer:",
connection.remotePublicKey.toString("hex")
);
}
}

Expand Down

0 comments on commit 9b170ec

Please sign in to comment.