Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
fix u8s cast to u32
Browse files Browse the repository at this point in the history
  • Loading branch information
goastler committed May 19, 2023
1 parent 04c6273 commit 3591ad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/captcha/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -880,10 +880,10 @@ pub mod prosopo {
/// Returns the history and expired hashes.
fn trim_user_history(&self, mut history: Vec<Hash>) -> (Vec<Hash>, Vec<Hash>) {
let block_number = self.env().block_number();
let max_age = if block_number < self.max_user_history_age {
let max_age = if block_number < self.max_user_history_age as u32 {
block_number
} else {
self.max_user_history_age
self.max_user_history_age as u32
};
let age_threshold = block_number - max_age;
let mut expired = Vec::new();
Expand Down

0 comments on commit 3591ad2

Please sign in to comment.