@leofcoin/workers 1.5.44 → 1.6.0
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/exports/binary-worker-BxQdEW3s.js +672 -0
- package/exports/binary-worker.d.ts +11 -0
- package/exports/binary-worker.js +1 -0
- package/exports/block-worker.js +7 -7
- package/exports/browser/binary-worker-BxQdEW3s.js +672 -0
- package/exports/browser/binary-worker.js +1 -0
- package/exports/browser/block-worker.js +7 -7
- package/exports/browser/machine-worker.js +139 -1192
- package/exports/browser/{worker-BDTWOCzS.js → proposal.proto-8zgMfutf.js} +205 -362
- package/exports/machine-worker.js +139 -1192
- package/exports/{worker-BDTWOCzS.js → proposal.proto-8zgMfutf.js} +205 -362
- package/package.json +9 -4
- package/src/block-worker.js +1 -1
- package/src/pool-worker.js +1 -1
- package/src/transaction-worker.js +1 -1
package/exports/block-worker.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as BinaryFormat, p as proto, a as proto$1 } from './proposal.proto-8zgMfutf.js';
|
|
2
|
+
import { e as encodeFrames, d as decodeFrames, B as BinaryWorker } from './binary-worker-BxQdEW3s.js';
|
|
2
3
|
|
|
3
|
-
class ValidatorMessage extends
|
|
4
|
+
class ValidatorMessage extends BinaryFormat {
|
|
4
5
|
get messageName() {
|
|
5
6
|
return 'ValidatorMessage';
|
|
6
7
|
}
|
|
@@ -12,7 +13,7 @@ class ValidatorMessage extends FormatInterface {
|
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
class BlockMessage extends
|
|
16
|
+
class BlockMessage extends BinaryFormat {
|
|
16
17
|
get messageName() {
|
|
17
18
|
return 'BlockMessage';
|
|
18
19
|
}
|
|
@@ -40,14 +41,13 @@ class BlockMessage extends FormatInterface {
|
|
|
40
41
|
encoded = encoded || this.encoded;
|
|
41
42
|
super.decode(encoded);
|
|
42
43
|
// @ts-ignore
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
this.decoded.validators = decodeFrames(this.decoded.validators, 0, { canonical: false }).map((validator) => new ValidatorMessage(validator).decoded);
|
|
44
|
+
// Binary-only protocol also requires canonical validator frame lengths.
|
|
45
|
+
this.decoded.validators = decodeFrames(this.decoded.validators).map((validator) => new ValidatorMessage(validator).decoded);
|
|
46
46
|
return this.decoded;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
const worker = new
|
|
50
|
+
const worker = new BinaryWorker();
|
|
51
51
|
globalThis.BigNumber = BigNumber;
|
|
52
52
|
globalThis.contracts = {};
|
|
53
53
|
const run = async (blocks) => {
|