Skip to content

Commit 4d61d45

Browse files
committed
lint
1 parent 40391e2 commit 4d61d45

3 files changed

Lines changed: 8 additions & 29 deletions

File tree

bindings/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const require = createRequire(import.meta.url);
88
type Bindings = {
99
pool: {
1010
ensureCapacity: (capacity: number) => void;
11-
},
11+
};
1212
pubkey2index: {
1313
ensureCapacity: (capacity: number) => void;
1414
get: (pubkey: Uint8Array) => number | undefined;

bindings/test/index.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ describe("sanity", () => {
66
expect(bindings).toBeDefined();
77
});
88
});
9-

bindings/test/proposer_index.test.ts

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,12 @@ describe("computeProposerIndex", () => {
1616
}
1717

1818
it("should compute proposer index for phase0", () => {
19-
const result = bindings.computeProposerIndex(
20-
"phase0",
21-
effectiveBalanceIncrements,
22-
indices,
23-
seed
24-
);
19+
const result = bindings.computeProposerIndex("phase0", effectiveBalanceIncrements, indices, seed);
2520
expect(result).toBe(789);
2621
});
2722

2823
it("should compute proposer index for electra", () => {
29-
const result = bindings.computeProposerIndex(
30-
"electra",
31-
effectiveBalanceIncrements,
32-
indices,
33-
seed
34-
);
24+
const result = bindings.computeProposerIndex("electra", effectiveBalanceIncrements, indices, seed);
3525
expect(result).toBe(161);
3626
});
3727

@@ -40,12 +30,7 @@ describe("computeProposerIndex", () => {
4030
const expected = 789;
4131

4232
for (const fork of forks) {
43-
const result = bindings.computeProposerIndex(
44-
fork,
45-
effectiveBalanceIncrements,
46-
indices,
47-
seed
48-
);
33+
const result = bindings.computeProposerIndex(fork, effectiveBalanceIncrements, indices, seed);
4934
expect(result).toBe(expected);
5035
}
5136
});
@@ -55,20 +40,15 @@ describe("computeProposerIndex", () => {
5540
const expected = 161;
5641

5742
for (const fork of forks) {
58-
const result = bindings.computeProposerIndex(
59-
fork,
60-
effectiveBalanceIncrements,
61-
indices,
62-
seed
63-
);
43+
const result = bindings.computeProposerIndex(fork, effectiveBalanceIncrements, indices, seed);
6444
expect(result).toBe(expected);
6545
}
6646
});
6747

6848
it("should throw on invalid seed length", () => {
6949
const shortSeed = new Uint8Array(16);
70-
expect(() =>
71-
bindings.computeProposerIndex("phase0", effectiveBalanceIncrements, indices, shortSeed)
72-
).toThrow("InvalidSeedLength");
50+
expect(() => bindings.computeProposerIndex("phase0", effectiveBalanceIncrements, indices, shortSeed)).toThrow(
51+
"InvalidSeedLength"
52+
);
7353
});
7454
});

0 commit comments

Comments
 (0)