fix: hashQueryRoutingTable is a map not object

This commit is contained in:
Derrick Hammer 2023-11-18 04:54:41 -05:00
parent 479e6b8bd5
commit 4848236882
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -31,8 +31,8 @@ export default async function (
const hashCode = hash.hashCode;
if (node.hashQueryRoutingTable.has(hashCode)) {
if (!node.hashQueryRoutingTable[hashCode].includes(peer.id)) {
node.hashQueryRoutingTable[hashCode].push(peer.id);
if (!node.hashQueryRoutingTable.get(hashCode)?.has(peer.id)) {
node.hashQueryRoutingTable.get(hashCode)?.add(peer.id);
}
return;
}