Skip to content

Commit

Permalink
Merge branch 'main' into feat/queries_to_points
Browse files Browse the repository at this point in the history
  • Loading branch information
Okm165 authored Jan 9, 2024
2 parents c1bff06 + 475ab6f commit 5069932
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/proof_of_work/config.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ struct ProofOfWorkConfig {
n_bits: u8,
}

fn proof_of_work_config_validate(config: ProofOfWorkConfig) {
assert(config.n_bits.into() >= MIN_PROOF_OF_WORK_BITS, 'value proof of work bits to low');
assert(config.n_bits.into() <= MIN_PROOF_OF_WORK_BITS, 'value proof of work bits to big');
#[generate_trait]
impl ProofOfWorkConfigImpl of ProofOfWorkConfigTrait {
fn config_validate(ref self: ProofOfWorkConfig) {
assert(self.n_bits.into() >= MIN_PROOF_OF_WORK_BITS, 'value proof of work bits to low');
assert(self.n_bits.into() <= MAX_PROOF_OF_WORK_BITS, 'value proof of work bits to big');
}
}

0 comments on commit 5069932

Please sign in to comment.