Skip to content

Commit

Permalink
fix duration check (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
frank0528 authored Oct 10, 2024
1 parent 5b7c2ba commit 2cedfb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pallets/rent-machine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ impl<T: Config> Pallet<T> {
let gpu_num = rent_info.gpu_num;

// 续租允许10分钟及以上
ensure!(duration >= 20u32.into(), Error::<T>::ReletTooShort);
ensure!(duration >= (10 * ONE_MINUTE).into(), Error::<T>::ReletTooShort);
ensure!(rent_info.renter == renter, Error::<T>::NotMachineRenter);
ensure!(rent_info.rent_status == RentStatus::Renting, Error::<T>::NoOrderExist);

Expand Down

0 comments on commit 2cedfb2

Please sign in to comment.