Skip to content

Commit

Permalink
bug fix #99
Browse files Browse the repository at this point in the history
  • Loading branch information
sadeghte committed Jun 24, 2023
1 parent 9a6d68e commit 243386f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/plugins/db-synchronizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ export default class DbSynchronizer extends CallablePlugin {
* may introduce bias and reduce the randomness of the system. To keep
* randomness and prevent always selecting fast nodes, we can select half
* of the nodes as the candidate nodes and then select some of them to do query. */
const candidateDeployers = deployers.slice(0, Math.ceil(deployers.length/2))
let numCandidate = Math.min(10, Math.ceil(deployers.length/2))
const candidateDeployers = _.shuffle(deployers).slice(0, numCandidate)

const onlineDeployers: string[] = await NetworkIpc.findNOnlinePeer(
candidateDeployers,
Expand Down

0 comments on commit 243386f

Please sign in to comment.