Skip to content

Commit 6d42407

Browse files
committed
use esm
1 parent cc860ec commit 6d42407

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/vm/src/worker/signatureWorkerPool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export class SignatureWorkerPool {
2020

2121
constructor(numWorkers: number = 4) {
2222
const workerCode = `
23-
const { parentPort } = require('worker_threads')
24-
const { ecrecover } = require('@ethereumjs/util')
23+
import { parentPort } from 'worker_threads'
24+
import { ecrecover } from '@ethereumjs/util'
2525
2626
parentPort.on('message', (data) => {
2727
const { tasks, taskId } = data

packages/vm/test/benchmark/signatureVerification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { SignatureWorkerPool } from '../../src/worker/signatureWorkerPool.ts'
1010

1111
async function runBenchmark() {
1212
// Create 10 test transactions
13-
const transactions = Array.from({ length: 1000 }, (_, i) => {
13+
const transactions = Array.from({ length: 2000 }, (_, i) => {
1414
return new LegacyTx({
1515
nonce: i,
1616
gasPrice: 1000000000n,

0 commit comments

Comments
 (0)