File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import type { ServiceMap } from "./targets/interface.js"
19
19
import { Runtime , createRuntime } from "./runtime/index.js"
20
20
import { validatePayload } from "./schema.js"
21
21
import { assert } from "./utils.js"
22
+ import { GossipLogService } from "@canvas-js/gossiplog/service"
22
23
23
24
export interface NetworkConfig {
24
25
offline ?: boolean
@@ -201,9 +202,7 @@ export class Canvas<T extends Contract = Contract> extends EventEmitter<CanvasEv
201
202
202
203
const startPingTimer = ( ) => {
203
204
this . pingTimer = setInterval ( ( ) => {
204
- // topic is canvas/{app.topic}
205
- const topics = this . libp2p . services . pubsub . getTopics ( )
206
- const subscribers = this . libp2p . services . pubsub . getSubscribers ( topics [ 0 ] )
205
+ const subscribers = this . libp2p . services . pubsub . getSubscribers ( GossipLogService . topicPrefix + this . topic )
207
206
const pings = this . peers . map ( ( peer ) =>
208
207
this . libp2p . services . ping
209
208
. ping ( peer )
You can’t perform that action at this time.
0 commit comments