Skip to content

Commit

Permalink
Validate OralceInput.threshold != 0
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Nov 9, 2023
1 parent edbad39 commit 8090a6e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dlc-manager/src/contract/contract_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ impl OracleInput {
));
}

if self.threshold == 0 {
return Err(Error::InvalidParameters(
"Threshold cannot be zero.".to_string(),
));
}

Ok(())
}
}
Expand Down

0 comments on commit 8090a6e

Please sign in to comment.