Describe the bug
The NodesGetAll handler needs to be fixed. I did a monkey patch while testing and it needs to be applied to Polykey.
// client/handlers/NodesgetAll.ts
for await (const [index, bucket] of nodeGraph.getBuckets()) {
for (const [id, info] of bucket) {
const encodedId = nodesUtils.encodeNodeId(id);
// For every node in every bucket, add it to our message
if (ctx.signal.aborted)
throw ctx.signal.reason;
yield {
bucketIndex: index,
nodeIdEncoded: encodedId,
host: info.address.host,
port: info.address.port,
};
}
}
Originally posted by @tegefaulkes in MatrixAI/Polykey-CLI#44 (comment)
To Reproduce
- Run
nodes getall in Polykey-CLI.
Expected behavior
Shouldn't throw an error and succeed.
Describe the bug
The
NodesGetAllhandler needs to be fixed. I did a monkey patch while testing and it needs to be applied toPolykey.Originally posted by @tegefaulkes in MatrixAI/Polykey-CLI#44 (comment)
To Reproduce
nodes getallin Polykey-CLI.Expected behavior
Shouldn't throw an error and succeed.