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

Commit

Permalink
fix: use dht selectors and validators from interfaces (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Apr 22, 2021
1 parent d2d40a9 commit 7b211a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"devDependencies": {
"aegir": "^33.0.0",
"libp2p-crypto": "^0.19.0",
"libp2p-interfaces": "^0.10.3",
"multibase": "^4.0.3",
"npm-run-all": "^4.1.5",
"peer-id": "^0.14.0"
Expand Down
2 changes: 1 addition & 1 deletion src/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const uint8ArrayToString = require('uint8arrays/to-string')
/**
* Select the best record out of the given records.
*
* @param {{ [key: string]: function (Uint8Array, Uint8Array[]): number }} selectors
* @param {import('libp2p-interfaces/src/types').DhtSelectors} selectors
* @param {Uint8Array} k
* @param {Array<Uint8Array>} records
*/
Expand Down
2 changes: 1 addition & 1 deletion src/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const uint8ArrayToString = require('uint8arrays/to-string')
* It runs the needed validators.
* If verification fails the returned Promise will reject with the error.
*
* @param {{ [key: string]: { func: (key: Uint8Array, value: Uint8Array) => Promise<void> }}} validators
* @param {import('libp2p-interfaces/src/types').DhtValidators} validators
* @param {Record} record
*/
const verifyRecord = (validators, record) => {
Expand Down

0 comments on commit 7b211a5

Please sign in to comment.