mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
bin/taud: check if due timestamp is not less than current timestamp
This commit is contained in:
@@ -81,6 +81,12 @@ impl TaskInfo {
|
||||
|
||||
let id: u32 = find_free_id(&task_ids);
|
||||
|
||||
if let Some(d) = &due {
|
||||
if *d < get_current_time() {
|
||||
return Err(TaudError::InvalidDueTime)
|
||||
}
|
||||
}
|
||||
|
||||
Ok(Self {
|
||||
ref_id,
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user