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 typos in various files #2407

Merged
merged 4 commits into from
Dec 7, 2024
Merged
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/network/p2p/connectionFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export class ConnectionFilter implements ConnectionGater {
private allowedPeers: string[] | undefined;
private deniedPeers: string[];

constructor(addrs: string[] | undefined, deiniedPeers: string[] | undefined) {
constructor(addrs: string[] | undefined, deniedPeers: string[] | undefined) {
this.allowedPeers = addrs;
this.deniedPeers = deiniedPeers ?? [];
this.deniedPeers = deniedPeers ?? [];
}

updateAllowedPeers(addrs: string[] | undefined) {
Expand Down
6 changes: 3 additions & 3 deletions apps/hubble/src/network/sync/merkleTrie.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ describe("MerkleTrie", () => {
const rootHash = await trie.rootHash();

// Unload the trie
await trie.unloadChidrenAtRoot();
await trie.unloadChildrenAtRoot();

// Expect the root hash to be the same
expect(await trie.rootHash()).toEqual(rootHash);
Expand Down Expand Up @@ -485,7 +485,7 @@ describe("MerkleTrie", () => {
const rootHash = await trie.rootHash();

// Unload all the children of the first node
await trie.unloadChidrenAtRoot();
await trie.unloadChildrenAtRoot();

// Now try deleting syncId1
expect(await trie.delete(syncId1)).toBeTruthy();
Expand Down Expand Up @@ -641,7 +641,7 @@ describe("MerkleTrie", () => {
const trie = await trieWithIds([1665182332, 1665182343, 1665182345]);

// Unload all the children of the first node
await trie.unloadChidrenAtRoot();
await trie.unloadChildrenAtRoot();

let values = await trie.getAllValues(new Uint8Array(Buffer.from("16651823")));
expect(values?.length).toEqual(3);
Expand Down
4 changes: 2 additions & 2 deletions apps/hubble/src/network/sync/merkleTrie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ class MerkleTrie {
return await rsMerkleTrieRootHash(this._rustTrie);
}

public async unloadChidrenAtRoot(): Promise<void> {
public async unloadChildrenAtRoot(): Promise<void> {
return await rsMerkleTrieUnloadChildren(this._rustTrie);
}

Expand All @@ -388,7 +388,7 @@ class MerkleTrie {
}

public async commitToDb(): Promise<void> {
return await this.unloadChidrenAtRoot();
return await this.unloadChildrenAtRoot();
}
}

Expand Down
2 changes: 1 addition & 1 deletion apps/hubble/src/network/sync/multiPeerSyncEngine.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ describe("Multi peer sync engine with streams", () => {

const messageStats2 = (await syncHealthProbe.computeSyncHealthMessageStats(start, stop))._unsafeUnwrap();

// Query is inclusive of the start time and exclusive of the stop time. We cound 150, 170, 180 on engine1 and 150, 170 on engine 2
// Query is inclusive of the start time and exclusive of the stop time. We count 150, 170, 180 on engine1 and 150, 170 on engine 2
expect(messageStats2.primaryNumMessages).toEqual(3);
expect(messageStats2.peerNumMessages).toEqual(2);

Expand Down