Skip to content

Commit ea64f37

Browse files
authored
docs: fix API docs (#101)
The API docs were copy and pasted, but then not correctly adapted. Fix the wrong descriptions. Also change the parameter naming to be more consistent.
1 parent be10f24 commit ea64f37

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/seal.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,11 @@ fn seal_pre_commit_phase1_inner<Tree: 'static + MerkleTreeTrait>(
536536
///
537537
/// # Arguments
538538
/// * `registered_proof` - Selected seal operation.
539-
/// * `cache_path` - Directory path to use for generation of Merkle tree on disk.
540-
/// * `output_dir` - Directory where the TreeRLast(s) are stored.
539+
/// * `output_dir` - The directory where the label layers will be stored.
540+
/// * `replica_id` - The ReplicaID to use for the SDR
541541
pub fn sdr<R>(
542542
registered_proof: RegisteredSealProof,
543-
cache_path: R,
543+
output_dir: R,
544544
replica_id: <filecoin_proofs_v1::constants::DefaultTreeHasher as Hasher>::Domain,
545545
) -> Result<()>
546546
where
@@ -555,7 +555,7 @@ where
555555
u64::from(registered_proof.sector_size()),
556556
sdr_inner,
557557
registered_proof,
558-
cache_path.as_ref(),
558+
output_dir.as_ref(),
559559
replica_id,
560560
)?;
561561

@@ -564,11 +564,11 @@ where
564564

565565
fn sdr_inner<Tree: 'static + MerkleTreeTrait>(
566566
registered_proof: RegisteredSealProof,
567-
cache_path: &Path,
567+
output_dir: &Path,
568568
replica_id: <Tree::Hasher as Hasher>::Domain,
569569
) -> Result<()> {
570570
let config = registered_proof.as_v1_config();
571-
filecoin_proofs_v1::sdr::<_, Tree>(&config, cache_path, &replica_id)?;
571+
filecoin_proofs_v1::sdr::<_, Tree>(&config, output_dir, &replica_id)?;
572572
Ok(())
573573
}
574574

@@ -692,7 +692,7 @@ fn generate_tree_r_last_inner<Tree: 'static + MerkleTreeTrait>(
692692
/// # Arguments
693693
/// * `registered_proof` - Selected seal operation.
694694
/// * `input_dir` - Directory where the label layers are stored.
695-
/// * `output_dir` - Directory where the TreeRLast(s) are stored.
695+
/// * `output_dir` - Directory where the TreeC is stored (may be split into several files).
696696
pub fn generate_tree_c<O, R>(
697697
registered_proof: RegisteredSealProof,
698698
input_dir: R,
@@ -923,7 +923,6 @@ fn seal_commit_phase2_inner<Tree: 'static + MerkleTreeTrait>(
923923
/// # Arguments
924924
///
925925
/// * `phase1_output` - Struct returned from [`seal_commit_phase1`] containing Merkle tree proof.
926-
/// * `prover_id` - Unique ID of the storage provider.
927926
/// * `sector_id` - ID of the sector, usually relative to the miner.
928927
///
929928
/// Returns [`SealCommitPhase2Output`] struct containing vector of zk-SNARK proofs.

0 commit comments

Comments
 (0)