Skip to content

Commit

Permalink
fixup! chore: linted dht
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad committed Mar 5, 2023
1 parent 2f30e3d commit 828879c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dht/dht-content-routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { DHT } from '@libp2p/interface-dht'
import type { ContentRouting } from '@libp2p/interface-content-routing'
import type { CID } from 'multiformats/cid'
import type { AbortOptions } from '@libp2p/interfaces'
import type { PeerInfo } from '@libp2p/interface-peer-info'

/**
* Wrapper class to convert events into returned values
Expand All @@ -19,7 +20,7 @@ export class DHTContentRouting implements ContentRouting {
await drain(this.dht.provide(cid))
}

async * findProviders (cid: CID, options: AbortOptions = {}): AsyncIterable<Uint8Array> {
async * findProviders (cid: CID, options: AbortOptions = {}): AsyncGenerator<PeerInfo, void, undefined> {
for await (const event of this.dht.findProviders(cid, options)) {
if (event.name === 'PROVIDER') {
yield * event.providers
Expand Down

0 comments on commit 828879c

Please sign in to comment.