Skip to content

Commit a47bd99

Browse files
committed
Wait finalized
1 parent f1a0d91 commit a47bd99

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

examples/store_big_data.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,14 @@ async function main() {
259259

260260
console.log(`Storing DAG...`);
261261
let { rootCid, dagBytes } = await buildUnixFSDagPB(chunks, 0xb220);
262-
let { cid } = await store(bulletinAPI, signers[0].signer, dagBytes);
262+
let { cid } = await store(
263+
bulletinAPI,
264+
signers[0].signer,
265+
dagBytes,
266+
undefined,
267+
undefined,
268+
TX_MODE_FINALIZED_BLOCK
269+
);
263270
console.log(`Downloading...${cid} / ${rootCid}`);
264271
let downloadedContent = await fetchCid(HTTP_IPFS_API, rootCid);
265272
console.log(`✅ Reconstructed file size: ${downloadedContent.length} bytes`);

0 commit comments

Comments
 (0)