Skip to content

Commit 558e598

Browse files
committed
chore: remove _isStarted as it's no longer used
_isStarted is an outdated property and shouldn't exist in the code anymore. The state machine handles start logic and the isStarted computed property pulls from there. The code comments around dht and pubsub are also no longer valid, so they were deleted.
1 parent dcf59a8 commit 558e598

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ class Node extends EventEmitter {
5353

5454
this._modules = _options.modules
5555
this._config = _options.config
56-
this._isStarted = false
5756
this._transport = [] // Transport instances/references
5857
this._discovery = [] // Discovery service instances/references
5958

@@ -400,18 +399,13 @@ class Node extends EventEmitter {
400399
}
401400
},
402401
(cb) => {
403-
// TODO: chicken-and-egg problem #1:
404-
// have to set started here because DHT requires libp2p is already started
405-
this._isStarted = true
406402
if (this._dht) {
407403
this._dht.start(cb)
408404
} else {
409405
cb()
410406
}
411407
},
412408
(cb) => {
413-
// TODO: chicken-and-egg problem #2:
414-
// have to set started here because FloodSub requires libp2p is already started
415409
if (this._floodSub) {
416410
return this._floodSub.start(cb)
417411
}

0 commit comments

Comments
 (0)