diff --git a/.zombienet-tests/0002-checkSync.ts b/.zombienet-tests/0002-checkSync.ts index 6632f96c..feed9b90 100644 --- a/.zombienet-tests/0002-checkSync.ts +++ b/.zombienet-tests/0002-checkSync.ts @@ -5,12 +5,30 @@ export async function run(nodeName: string, networkInfo: any) { let count = 0 await new Promise(async (resolve, reject) => { + let requested = false const chainHeadFollower = chainHead( true, (event) => { - if (event.type === "finalized" && ++count === 2) { - resolve(chainHeadFollower.unfollow()) + if (event.type === "newBlock") { + chainHeadFollower.unpin([event.blockHash]) + return } + if (requested || event.type !== "initialized") return + const latestFinalized = event.finalizedBlockHash + requested = true + + chainHeadFollower + .storage( + latestFinalized, + "descendantsValues", + "0x5f3e4907f716ac89b6347d15ececedca88dcde934c658227ee1dfafcd6e16903", + null, + ) + .then((some) => { + console.log("111", some) + resolve(chainHeadFollower.unfollow()) + }) + chainHeadFollower.unpin([latestFinalized]) }, reject, )