We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aae3f19 commit c61d596Copy full SHA for c61d596
1 file changed
src/rpc/methods/chain.rs
@@ -338,7 +338,14 @@ impl RpcMethod<1> for ForestChainExport {
338
339
tokio::select! {
340
result = chain_export => {
341
- result.map(|_| ApiExportResult::Done)
+ if let Some(checksum) = result? {
342
+ let path = forest_car_sha256sum_path(&output_path);
343
+ std::fs::write(path, format!("{} {}\n",
344
+ checksum.encode_hex::<String>(),
345
+ output_path.file_name().and_then(std::ffi::OsStr::to_str)
346
+ .context("Failed to retrieve file name while saving checksum")?))?;
347
+ }
348
+ tmp_path.persist(&output_path)?;
349
},
350
_ = chain_export_guard.cancellation_token().cancelled() => {
351
chain_export_guard.cancel_export();
0 commit comments