p2p-indexing-and-search
p2p-indexing-and-search copied to clipboard
tutorial log length=0
I am stuck at this point in the tutorial https://github.com/hypercore-protocol/p2p-indexing-and-search/blob/main/problems/06.md
I assume I am doing something wrong here but the length is 0 for me.
// Run this file with the hyperspace-simulator
// hyperspace-simulator index.js
const { Client } = require('hyperspace')
const STATS_CORE_KEY = '309ba1736cc5af2940fc9fb03d256547b78ca9972ce4398648a7d7782d31ad4b'
main()
async function main() {
const { corestore, network, replicate } = new Client()
const store = corestore()
const statsCore = store.get({ key: STATS_CORE_KEY, valueEncoding: 'json' })
await statsCore.ready()
console.log({ statsCore })
console.log('length:', statsCore.length)
}
$ hyperspace-simulator index.js
{
statsCore: RemoteHypercore(
key: 309ba1736cc5af2940fc9fb03d256547b78ca9972ce4398648a7d7782d31ad4b
discoveryKey: a33d9da0369f1d04200b81b815d4e4e1f03086532d5555aca5623fddbb682c3b
opened: true
writable: false
length: 0
byteLength: 0
peers: 0
)
}
length: 0
It looks like all peers of the core 309ba1736cc5af2940fc9fb03d256547b78ca9972ce4398648a7d7782d31ad4b are off now.
Can confirm that all three remote cores from the tutorial are no longer being seeded (at least at the moment). I'll open another issue to clarify this for future users.