Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
fix: in _findNProviders correctly calculate pathSize
Browse files Browse the repository at this point in the history
  • Loading branch information
kumavis committed May 19, 2019
1 parent 042e852 commit 5841dfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/private.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ module.exports = (dht) => ({
const paths = []
const query = new Query(dht, key.buffer, (pathIndex, numPaths) => {
// This function body runs once per disjoint path
const pathSize = utils.pathSize(out.length - n, numPaths)
const pathSize = utils.pathSize(n - out.length, numPaths)
const pathProviders = new LimitedPeerList(pathSize)
paths.push(pathProviders)

Expand Down

0 comments on commit 5841dfe

Please sign in to comment.