@acala-network/chopsticks-core 0.9.1-4 → 0.9.1
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.
|
@@ -56,9 +56,21 @@ const wellKnownKeys = [
|
|
|
56
56
|
];
|
|
57
57
|
},
|
|
58
58
|
type: '(u32, u32)'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'relay_dispatch_queue_size',
|
|
62
|
+
prefixHex: '0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e',
|
|
63
|
+
decodeKey: (registry, key)=>{
|
|
64
|
+
// get last 4 bytes
|
|
65
|
+
const last4Bytes = '0x' + key.slice(-8);
|
|
66
|
+
return [
|
|
67
|
+
registry.createType('u32', (0, _util.hexToU8a)(last4Bytes)).toJSON()
|
|
68
|
+
];
|
|
69
|
+
},
|
|
70
|
+
type: '(u32, u32)'
|
|
59
71
|
}
|
|
60
72
|
].map((def)=>{
|
|
61
|
-
const prefix = (0, _util.stringToHex)(def.prefix || def.key);
|
|
73
|
+
const prefix = def.prefixHex ?? (0, _util.stringToHex)(def.prefix || def.key);
|
|
62
74
|
return {
|
|
63
75
|
name: def.name,
|
|
64
76
|
prefix,
|
|
@@ -234,6 +234,9 @@ const releaseWorker = async ()=>{
|
|
|
234
234
|
if (!__executor_worker) return;
|
|
235
235
|
const executor = await __executor_worker;
|
|
236
236
|
executor.remote[_comlink.releaseProxy]();
|
|
237
|
+
// this delay seems to fix hanging tests
|
|
238
|
+
// https://github.com/vitest-dev/vitest/issues/3077
|
|
239
|
+
await new Promise((resolve)=>setTimeout(resolve, 50));
|
|
237
240
|
await executor.terminate();
|
|
238
241
|
__executor_worker = undefined;
|
|
239
242
|
};
|
|
@@ -46,9 +46,21 @@ const wellKnownKeys = [
|
|
|
46
46
|
];
|
|
47
47
|
},
|
|
48
48
|
type: '(u32, u32)'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'relay_dispatch_queue_size',
|
|
52
|
+
prefixHex: '0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e',
|
|
53
|
+
decodeKey: (registry, key)=>{
|
|
54
|
+
// get last 4 bytes
|
|
55
|
+
const last4Bytes = '0x' + key.slice(-8);
|
|
56
|
+
return [
|
|
57
|
+
registry.createType('u32', hexToU8a(last4Bytes)).toJSON()
|
|
58
|
+
];
|
|
59
|
+
},
|
|
60
|
+
type: '(u32, u32)'
|
|
49
61
|
}
|
|
50
62
|
].map((def)=>{
|
|
51
|
-
const prefix = stringToHex(def.prefix || def.key);
|
|
63
|
+
const prefix = def.prefixHex ?? stringToHex(def.prefix || def.key);
|
|
52
64
|
return {
|
|
53
65
|
name: def.name,
|
|
54
66
|
prefix,
|
|
@@ -150,6 +150,9 @@ export const releaseWorker = async ()=>{
|
|
|
150
150
|
if (!__executor_worker) return;
|
|
151
151
|
const executor = await __executor_worker;
|
|
152
152
|
executor.remote[Comlink.releaseProxy]();
|
|
153
|
+
// this delay seems to fix hanging tests
|
|
154
|
+
// https://github.com/vitest-dev/vitest/issues/3077
|
|
155
|
+
await new Promise((resolve)=>setTimeout(resolve, 50));
|
|
153
156
|
await executor.terminate();
|
|
154
157
|
__executor_worker = undefined;
|
|
155
158
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acala-network/chopsticks-core",
|
|
3
|
-
"version": "0.9.1
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"author": "Acala Developers <hello@acala.network>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -13,21 +13,21 @@
|
|
|
13
13
|
"docs:prep": "typedoc"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@acala-network/chopsticks-executor": "0.9.1
|
|
16
|
+
"@acala-network/chopsticks-executor": "0.9.1",
|
|
17
17
|
"@polkadot/api": "^10.10.1",
|
|
18
18
|
"@polkadot/util-crypto": "^12.5.1",
|
|
19
19
|
"comlink": "^4.4.1",
|
|
20
20
|
"eventemitter3": "^5.0.1",
|
|
21
21
|
"lodash": "^4.17.21",
|
|
22
22
|
"pino": "^8.16.1",
|
|
23
|
-
"pino-pretty": "^10.2.
|
|
24
|
-
"zod": "^3.22.
|
|
23
|
+
"pino-pretty": "^10.2.3",
|
|
24
|
+
"zod": "^3.22.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@swc/cli": "0.1.62",
|
|
28
28
|
"@swc/core": "^1.3.96",
|
|
29
|
-
"@types/lodash": "^4.14.
|
|
30
|
-
"typescript": "^5.
|
|
29
|
+
"@types/lodash": "^4.14.201",
|
|
30
|
+
"typescript": "^5.2.2"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist/esm/**",
|