Skip to content

Commit fc03133

Browse files
committed
Fixed linting
1 parent cd20842 commit fc03133

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

packages/sequencer/src/protocol/production/sequencing/BlockProducerModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { inject } from "tsyringe";
2-
import { log, noop } from "@proto-kit/common";
2+
import { log } from "@proto-kit/common";
33
import { ACTIONS_EMPTY_HASH } from "@proto-kit/protocol";
44
import {
55
MethodIdResolver,

packages/sequencer/test/integration/BlockProduction.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { log, range, MOCK_PROOF } from "@proto-kit/common";
1+
import { log, range, MOCK_PROOF, expectDefined } from "@proto-kit/common";
22
import { VanillaProtocolModules } from "@proto-kit/library";
33
import {
44
Runtime,
@@ -168,7 +168,7 @@ describe("block production", () => {
168168
});
169169

170170
it("should produce a dummy block proof", async () => {
171-
expect.assertions(25);
171+
expect.assertions(27);
172172

173173
log.setLevel("TRACE");
174174

@@ -199,7 +199,7 @@ describe("block production", () => {
199199

200200
const latestBlockWithResult = await sequencer
201201
.resolve("BlockQueue")
202-
.getLatestBlock();
202+
.getLatestBlockAndResult();
203203

204204
let batch = await blockTrigger.produceBatch();
205205

@@ -208,8 +208,10 @@ describe("block production", () => {
208208
expect(batch!.blockHashes).toHaveLength(1);
209209
expect(batch!.proof.proof).toBe(MOCK_PROOF);
210210

211+
expectDefined(latestBlockWithResult);
212+
expectDefined(latestBlockWithResult.result);
211213
expect(
212-
latestBlockWithResult!.result.afterNetworkState.hash().toString()
214+
latestBlockWithResult.result.afterNetworkState.hash().toString()
213215
).toStrictEqual(batch!.toNetworkState.hash().toString());
214216

215217
// Check if the batchstorage has received the block

packages/sequencer/test/settlement/Settlement.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
/* eslint-disable no-inner-declarations */
2-
import { log, mapSequential, RollupMerkleTree } from "@proto-kit/common";
2+
import {
3+
expectDefined,
4+
log,
5+
mapSequential,
6+
RollupMerkleTree,
7+
} from "@proto-kit/common";
38
import { VanillaProtocolModules } from "@proto-kit/library";
49
import { Runtime } from "@proto-kit/module";
510
import {
@@ -277,7 +282,7 @@ export const settlementTestFn = (
277282
RollupMerkleTree.EMPTY_ROOT
278283
);
279284

280-
const lastBlock = await blockQueue.getLatestBlock();
285+
const lastBlock = await blockQueue.getLatestBlockAndResult();
281286

282287
await trigger.settle(batch!);
283288
nonceCounter++;
@@ -287,14 +292,16 @@ export const settlementTestFn = (
287292
console.log("Block settled");
288293

289294
const { settlement } = settlementModule.getContracts();
295+
expectDefined(lastBlock);
296+
expectDefined(lastBlock.result);
290297
expect(settlement.networkStateHash.get().toBigInt()).toStrictEqual(
291-
lastBlock!.result.afterNetworkState.hash().toBigInt()
298+
lastBlock.result.afterNetworkState.hash().toBigInt()
292299
);
293300
expect(settlement.stateRoot.get().toBigInt()).toStrictEqual(
294-
lastBlock!.result.stateRoot
301+
lastBlock.result.stateRoot
295302
);
296303
expect(settlement.blockHashRoot.get().toBigInt()).toStrictEqual(
297-
lastBlock!.result.blockHashRoot
304+
lastBlock.result.blockHashRoot
298305
);
299306
},
300307
timeout

0 commit comments

Comments
 (0)