This repository was archived by the owner on Jul 21, 2023. It is now read-only.
Commit ea8e6d0
fix: correct
As the `k-bucket` documentation [here](https://github.com/tristanls/k-bucket/blob/master/README.md#kbuckettoiterable) indicates, `toIterable` yields contact objects, **not** `KBucket` objects. Here, the contact objects are `KBucketPeer` objects.
You can check this in the code [here](https://github.com/tristanls/k-bucket/blob/3aa5b4f1dacb835752995a25409ab319d2070b9e/index.js#L413) - the delegated yield `yield * node.contacts` will yield each of the elements of the `node.contacts` array in order.
Co-authored-by: Alex Potsides <[email protected]>KBucketTree types (#426)1 parent f5b85fc commit ea8e6d0
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments