@leofcoin/workers 1.3.6 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/machine-worker.js +2 -2
package/package.json
CHANGED
package/src/machine-worker.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BlockMessage, ContractMessage } from '@leofcoin/messages'
|
|
2
2
|
import { formatBytes, BigNumber } from '@leofcoin/utils'
|
|
3
|
-
import bytecodes from '@leofcoin/lib/bytecodes
|
|
3
|
+
import bytecodes from '@leofcoin/lib/bytecodes' assert {type: 'json'}
|
|
4
4
|
import EasyWorker from '@vandeurenglenn/easy-worker'
|
|
5
5
|
const worker = new EasyWorker()
|
|
6
6
|
|
|
@@ -112,7 +112,7 @@ const _init = async ({ contracts, blocks, peerid })=> {
|
|
|
112
112
|
let lastBlock = {hash: '0x0'};
|
|
113
113
|
|
|
114
114
|
if (blocks?.length > 0) {
|
|
115
|
-
const _worker = await new EasyWorker('
|
|
115
|
+
const _worker = await new EasyWorker('node_modules/@leofcoin/workers/src/block-worker.js', {serialization: 'advanced', type: 'module' })
|
|
116
116
|
blocks = await _worker.once([blocks[blocks.length - 1]])
|
|
117
117
|
|
|
118
118
|
// blocks = unique(globalThis.blocks ? globalThis : [], blocks)
|