Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typographical errors #2474

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/hubble/src/profile/gossipProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export enum ProfileWorkerAction {
SendMessage = 2,
WaitForMessages = 3,
Stop = 4,
GetMultiAddres = 5,
GetMultiAddress = 5,
ConnectToMultiAddr = 6,
ReportPeers = 7,
}
Expand Down Expand Up @@ -101,7 +101,7 @@ export async function profileGossipServer(nodeConfig = "3:10") {

// 3. We'll connect each group of workers to the previous group
for (let i = 1; i < workers.length; i++) {
const workerResponse = await callWorkerMethod(workers[i - 1] as Worker, ProfileWorkerAction.GetMultiAddres);
const workerResponse = await callWorkerMethod(workers[i - 1] as Worker, ProfileWorkerAction.GetMultiAddress);
const prevMultiAddrs = workerResponse.response as MultiAddrResponse;

await callWorkerMethod(workers[i] as Worker, ProfileWorkerAction.ConnectToMultiAddr, {
Expand Down
2 changes: 1 addition & 1 deletion apps/hubble/src/profile/gossipProfileWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ parentPort?.on("message", (data) => {
await Promise.all(nodes.map((node) => node.stop()));

parentPort?.postMessage({ id, action, response: { peerIds, datas } });
} else if (action === ProfileWorkerAction.GetMultiAddres) {
} else if (action === ProfileWorkerAction.GetMultiAddress) {
const response = getMultiAddrs();
parentPort?.postMessage({ id, action, response });
} else if (action === ProfileWorkerAction.ConnectToMultiAddr) {
Expand Down
6 changes: 3 additions & 3 deletions apps/hubble/src/storage/stores/storageCache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ describe("getMessageCount", () => {
const fid = Factories.Fid.build();
const message = await Factories.CastAddMessage.create({ data: { fid } });
const message2 = await Factories.CastAddMessage.create({ data: { fid } });
const message3_differnt_fid = await Factories.CastAddMessage.create();
const message3_different_fid = await Factories.CastAddMessage.create();
await putMessage(db, message);
await putMessage(db, message2);
await putMessage(db, message3_differnt_fid);
await putMessage(db, message3_different_fid);
await expect(cache.getMessageCount(fid, UserPostfix.CastMessage)).resolves.toEqual(ok(2));
await expect(cache.getMessageCount(message3_differnt_fid.data.fid, UserPostfix.CastMessage)).resolves.toEqual(
await expect(cache.getMessageCount(message3_different_fid.data.fid, UserPostfix.CastMessage)).resolves.toEqual(
ok(1),
);
await expect(cache.getMessageCount(Factories.Fid.build(), UserPostfix.CastMessage)).resolves.toEqual(ok(0));
Expand Down