Skip to content

Commit d6d9e54

Browse files
style: resolve style guide violations [ci-lint-fix]
1 parent 8ae5da0 commit d6d9e54

7 files changed

Lines changed: 19 additions & 10 deletions

File tree

packages/constants/source/identifiers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export const Identifiers = {
174174
},
175175
},
176176
Forger: {
177-
Block: Symbol("Forger<Block>")
177+
Block: Symbol("Forger<Block>"),
178178
},
179179
P2P: {
180180
ApiNode: {

packages/forger/source/transaction-forger.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ export class TransactionForger implements Contracts.Forger.TransactionForger {
175175
return;
176176
} else {
177177
// In practice, this should never happen since the validator should reject transactions that exceed the block gas limit, but we check just in case.
178-
throw new Error(`Non-optimistic transaction processing requires more gas than remaining block space (tx.gasUsed=${gasUsed} gasLeft=${transaction.gasLimit})`);
178+
throw new Error(
179+
`Non-optimistic transaction processing requires more gas than remaining block space (tx.gasUsed=${gasUsed} gasLeft=${transaction.gasLimit})`,
180+
);
179181
}
180182
}
181183

packages/forger/source/transaction-iterable.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { Contracts } from "@mainsail/contracts";
33
import { Identifiers } from "@mainsail/constants";
44
import { inject, injectable } from "@mainsail/container";
55

6-
76
@injectable()
87
export class TransactionIterable implements AsyncIterable<Contracts.Crypto.Transaction> {
98
@inject(Identifiers.TransactionPool.Worker)
@@ -16,7 +15,7 @@ export class TransactionIterable implements AsyncIterable<Contracts.Crypto.Trans
1615

1716
public initialize(commitKey: Contracts.Evm.CommitKey): TransactionIterable {
1817
this.#commitKey = commitKey;
19-
return this
18+
return this;
2019
}
2120

2221
public async *[Symbol.asyncIterator](): AsyncIterator<Contracts.Crypto.Transaction> {
@@ -32,7 +31,7 @@ export class TransactionIterable implements AsyncIterable<Contracts.Crypto.Trans
3231
yield transaction;
3332
}
3433

35-
if(batch.transactions.length === 0) {
34+
if (batch.transactions.length === 0) {
3635
return;
3736
}
3837
}

packages/transaction-pool-service/source/selector.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ export class Selector implements Contracts.TransactionPool.Selector {
1212
#currentBlockRound = "";
1313
#index = 0;
1414

15-
public async getBatch(options: Contracts.TransactionPool.GetBatchOptions): Promise<Contracts.TransactionPool.GetBatchResult> {
15+
public async getBatch(
16+
options: Contracts.TransactionPool.GetBatchOptions,
17+
): Promise<Contracts.TransactionPool.GetBatchResult> {
1618
await this.#prepare(options.blockRound);
1719

1820
const transactions: Contracts.Crypto.TransactionData[] = [];
@@ -55,6 +57,6 @@ export class Selector implements Contracts.TransactionPool.Selector {
5557

5658
this.#currentBlockRound = blockRound;
5759
this.#index = 0;
58-
this.#transactions = await this.poolQuery.getFromHighestPriority().all()
60+
this.#transactions = await this.poolQuery.getFromHighestPriority().all();
5961
}
6062
}

packages/transaction-pool-worker/source/handlers/get-transactions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ export class GetTransactionsHandler {
88
@inject(Identifiers.TransactionPool.Selector)
99
private readonly selector!: Contracts.TransactionPool.Selector;
1010

11-
public async handle(options: Contracts.TransactionPool.GetBatchOptions): Promise<Contracts.TransactionPool.GetBatchResult> {
11+
public async handle(
12+
options: Contracts.TransactionPool.GetBatchOptions,
13+
): Promise<Contracts.TransactionPool.GetBatchResult> {
1214
return this.selector.getBatch(options);
1315
}
1416
}

packages/transaction-pool-worker/source/worker-handler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export class WorkerScriptHandler implements Contracts.TransactionPool.WorkerScri
3939
await this.#app.resolve(CommitHandler).handle(height, sendersAddresses, consumedGas, isSyncing);
4040
}
4141

42-
public async getTransactions(options: Contracts.TransactionPool.GetBatchOptions): Promise<Contracts.TransactionPool.GetBatchResult> {
42+
public async getTransactions(
43+
options: Contracts.TransactionPool.GetBatchOptions,
44+
): Promise<Contracts.TransactionPool.GetBatchResult> {
4345
return await this.#app.resolve(GetTransactionsHandler).handle(options);
4446
}
4547

packages/transaction-pool-worker/source/worker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ export class Worker implements Contracts.TransactionPool.Worker {
7979
await this.ipcSubprocess.sendRequest("start", blockNumber);
8080
}
8181

82-
public async getTransactions(options: Contracts.TransactionPool.GetBatchOptions): Promise<Contracts.TransactionPool.GetBatchResult> {
82+
public async getTransactions(
83+
options: Contracts.TransactionPool.GetBatchOptions,
84+
): Promise<Contracts.TransactionPool.GetBatchResult> {
8385
return this.ipcSubprocess.sendRequest("getTransactions", options);
8486
}
8587

0 commit comments

Comments
 (0)