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

Commit 5841dfe

Browse files
committed
fix: in _findNProviders correctly calculate pathSize
1 parent 042e852 commit 5841dfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/private.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ module.exports = (dht) => ({
538538
const paths = []
539539
const query = new Query(dht, key.buffer, (pathIndex, numPaths) => {
540540
// This function body runs once per disjoint path
541-
const pathSize = utils.pathSize(out.length - n, numPaths)
541+
const pathSize = utils.pathSize(n - out.length, numPaths)
542542
const pathProviders = new LimitedPeerList(pathSize)
543543
paths.push(pathProviders)
544544

0 commit comments

Comments
 (0)