probe: connect the api directly and report

This commit is contained in:
Satoshi Qazi Muhammed committed 2026-10-11 05:52:23 +04:00
1 parent 82d06f9355
commit 0c3cbc1af8
2 files changed
+21

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
// Probe: connect @pezkuwi/api to the dev node and report why it does not become ready.
import { ApiPromise, WsProvider } from '@pezkuwi/api';
const provider = new WsProvider('ws://127.0.0.1:30333');
const timer = setTimeout(() => { console.log('PROBE: not ready after 60s'); process.exit(2); }, 60_000);
for (const ext of [undefined, { AuthorizeCall: { extrinsic: {}, payload: {} } }]) {
console.log(`PROBE: create with signedExtensions=${ext ? 'AuthorizeCall' : 'none'}`);
try {
const api = await ApiPromise.create({ provider, signedExtensions: ext, throwOnConnect: true, throwOnUnknown: true });
console.log('PROBE: ready', api.runtimeVersion.specName.toString(), api.runtimeVersion.specVersion.toString());
console.log('PROBE: extensions', api.registry.signedExtensions.join(','));
console.log('PROBE: has bounties', !!api.tx.bounties, 'metadata v', api.runtimeMetadata.version);
} catch (e) {
console.log('PROBE: error', e?.stack || e);
}
}
clearTimeout(timer);
process.exit(0);
+2
View File
@@ -20,6 +20,8 @@ jobs:
done
echo; docker logs node 2>&1 | tail -5
- run: corepack enable && yarn install --immutable
- name: api probe
run: node .github/probe-api.mjs 2>&1 | tail -40
- name: Bounties spec (4 min cap)
run: timeout -s INT 240 yarn test:one :Bounties.slow. ; echo "rc=$?"
- name: CreateAccount spec (4 min cap)