Skip to content

Commit

Permalink
rename fake-post-validation feature to fake-proofs
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Apr 22, 2022
1 parent 3bf06c8 commit 217eb9c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions actors/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ min-power-2g = []
# no collateral for deals (for testing)
no-provider-deal-collateral = []

# fake PoSt validation (for testing)
fake-post-validation = []
# fake proofs (for testing)
fake-proofs = []

test_utils = ["hex"]
2 changes: 1 addition & 1 deletion actors/runtime/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static NETWORKS: &[(&str, &[&str])] = &[
"short-precommit",
"min-power-2k",
"no-provider-deal-collateral",
"fake-post-validation",
"fake-proofs",
],
),
];
Expand Down
4 changes: 2 additions & 2 deletions actors/runtime/src/runtime/fvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,15 +386,15 @@ where
}
}

#[cfg(not(feature = "fake-post-validation"))]
#[cfg(not(feature = "fake-proofs"))]
fn verify_post(&self, verify_info: &WindowPoStVerifyInfo) -> Result<(), Error> {
match fvm::crypto::verify_post(verify_info) {
Ok(true) => Ok(()),
Ok(false) | Err(_) => Err(Error::msg("invalid post")),
}
}

#[cfg(feature = "fake-post-validation")]
#[cfg(feature = "fake-proofs")]
fn verify_post(&self, verify_info: &WindowPoStVerifyInfo) -> Result<(), Error> {
Ok(())
}
Expand Down

0 comments on commit 217eb9c

Please sign in to comment.