-
Notifications
You must be signed in to change notification settings - Fork 193
Adding fuzz target for contraction #1435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added a fuzz target for cycle check validation and idempotency check (calling contract_nodes twice doesn't crash)
Pull Request Test Coverage Report for Build 14759015542Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
I will start reviewing the PRs starting from this sometime around today/tomorrow |
Hey @IvanIsCoding, did you get time to review these? |
Not yet, I will try to review this and #1337 it’s what on the top of my list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, minor Rust style comment
|
||
// Run contraction with cycle check (may fail) | ||
let result = graph.contract_nodes(to_contract.clone(), input.replacement_weight, true); | ||
if let Err(ContractError::DAGWouldCycle) = result { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a match call, with the Ok(_)
branch covering the idempotency and the Err
branch checking for ContractError::DAGWouldCycle
Something along the lines
match graph.contract_nodes(...) {
Ok(_) => { /* idempotency */},
Err(_) => {/* dag cycle */ }
}
* Adding fuzz target for contraction Added a fuzz target for cycle check validation and idempotency check (calling contract_nodes twice doesn't crash) * Fixing Lint issues * Updates based on comments
Added a fuzz target for cycle check validation and idempotency check (calling contract_nodes twice doesn't crash).