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:
Sean Zellmer
2025-04-10 12:15:57 -05:00
committed by GitHub
parent 0d7fbfe0c3
commit 6cd081e49e
4 changed files with 4 additions and 16 deletions

View File

@@ -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()