Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Jan 24, 2025
1 parent 5f7980f commit 398d95e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions proposer/succinct/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ use sp1_sdk::{
utils, HashableKey, Prover, ProverClient, SP1Proof, SP1ProofMode, SP1ProofWithPublicValues,
SP1_CIRCUIT_VERSION,
};
use std::{env, fs, str::FromStr, time::Instant};
use std::{
env, fs,
str::FromStr,
time::{Instant, SystemTime, UNIX_EPOCH},
};
use tower_http::limit::RequestBodyLimitLayer;

pub const RANGE_ELF: &[u8] = include_bytes!("../../../elf/range-elf");
Expand Down Expand Up @@ -554,7 +558,12 @@ async fn get_proof_status(
};

// Check the deadline.
if status.deadline < Instant::now().elapsed().as_secs() {
if status.deadline
< SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs()
{
error!(
"Proof request timed out on the server. Default timeout is set to 4 hours. Returning status as Unfulfillable."
);
Expand Down

0 comments on commit 398d95e

Please sign in to comment.