Skip to content

Commit 9056241

Browse files
committed
fix(test): check correct number of extrinsics for deletion
1 parent 703fd09 commit 9056241

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/suites/integration/solochain-evm/sdk-precompiles.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ await describeMspNet(
531531
await userApi.fisherman.retryableWaitAndVerifyBatchDeletions({
532532
blockProducerApi: userApi,
533533
deletionType: "User",
534-
expectExt: 1,
534+
expectExt: 2,
535535
userApi,
536536
mspApi: msp1Api,
537537
expectedBucketCount: 1,
@@ -541,10 +541,12 @@ await describeMspNet(
541541
// Wait until the MSP detects the on-chain deletion and updates its local bucket forest
542542
await msp1Api.wait.mspBucketFileDeletionCompleted(fileKey.toHex(), bucketId);
543543

544-
// Finalise the block containing the `BucketFileDeletionsCompleted` event in the MSP node
545-
// so that the `BucketFileDeletionsCompleted` event is finalised on-chain and the MSP deletes the
546-
// file from its file storage.
547-
await msp1Api.rpc.engine.finalizeBlock(deleteFileBlock.blockReceipt.blockHash);
544+
// Non-producer nodes must explicitly finalize imported blocks to trigger file deletion
545+
// Producer node (user) has finalized blocks, but BSP and MSP must finalize locally
546+
const finalisedBlockHash = await userApi.rpc.chain.getFinalizedHead();
547+
548+
await msp1Api.wait.blockImported(finalisedBlockHash.toString());
549+
await msp1Api.block.finaliseBlock(finalisedBlockHash.toString());
548550

549551
// Wait until the MSP detects the now finalised deletion and correctly deletes the file from its file storage
550552
await msp1Api.wait.fileDeletionFromFileStorage(fileKey.toHex());

0 commit comments

Comments
 (0)