Skip to content

Commit

Permalink
fix: add missing service capabilities (#2911)
Browse files Browse the repository at this point in the history
This is used to know when a service as the pub sub capabilities

Signed-off-by: Sacha Froment <sfroment42@gmail.com>
  • Loading branch information
sfroment authored Jan 13, 2025
1 parent f16281d commit fe8af37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/pubsub-floodsub/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* ```
*/

import { pubSubSymbol, serviceDependencies } from '@libp2p/interface'
import { pubSubSymbol, serviceCapabilities, serviceDependencies } from '@libp2p/interface'
import { PubSubBaseProtocol, type PubSubComponents } from '@libp2p/pubsub'
import { toString } from 'uint8arrays/to-string'
import { SimpleTimeCache } from './cache.js'
Expand Down Expand Up @@ -82,6 +82,10 @@ class FloodSub extends PubSubBaseProtocol {

readonly [Symbol.toStringTag] = '@libp2p/floodsub'

readonly [serviceCapabilities]: string[] = [
'@libp2p/pubsub'
]

readonly [serviceDependencies]: string[] = [
'@libp2p/identify'
]
Expand Down

0 comments on commit fe8af37

Please sign in to comment.