mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 14:34:19 +01:00
Remove findingPeers() & some flush() flow from hyperswarm examples (#176)
`swarm.flush()` was kept in scenarios where replicating a hypercore immediately was required.
This commit is contained in:
@@ -100,9 +100,8 @@ const core = store.get({ key, valueEncoding: 'json' })
|
||||
// wait till all the properties of the hypercore instance are initialized
|
||||
await core.ready()
|
||||
|
||||
const foundPeers = core.findingPeers()
|
||||
swarm.join(core.discoveryKey)
|
||||
swarm.flush().then(() => foundPeers())
|
||||
await swarm.flush()
|
||||
|
||||
// update the meta-data of the hypercore instance
|
||||
await core.update()
|
||||
|
||||
Reference in New Issue
Block a user