pub fn add_request(&mut self, request: T, now: u64) -> Nonce {
        let num_expected_responses = request.num_expected_responses();
        let nonce = thread_rng().gen_range(0, Nonce::MAX);
        self.requests.put(
            nonce,
            RequestStatus {
                expire_timestamp: now + DEFAULT_REQUEST_EXPIRATION_MS,
                num_expected_responses,
                request,
            },
        );
        nonce
    }
// Returns boolean indicating whether sufficient time has passed for a request with
// the given timestamp to be made
Returns boolean indicating whether sufficient time has passed for a request with
the given timestamp to be made
Returns boolean indicating whether sufficient time has passed for a request with the given timestamp to be made
pub fn add_request(&mut self, request: T, now: u64) -> Nonce {
        let num_expected_responses = request.num_expected_responses();
        let nonce = thread_rng().gen_range(0, Nonce::MAX);
        self.requests.put(
            nonce,
            RequestStatus {
                expire_timestamp: now + DEFAULT_REQUEST_EXPIRATION_MS,
                num_expected_responses,
                request,
            },
        );
        nonce
    }
pub fn add_request ( & mut self , request : T , now : u64 ) -> Nonce { let num_expected_responses = request . num_expected_responses ( ) ; let nonce = thread_rng ( ) . gen_range ( 0 , Nonce :: MAX ) ; self . requests . put ( nonce , RequestStatus { expire_timestamp : now + DEFAULT_REQUEST_EXPIRATION_MS , num_expected_responses , request , } , ) ; nonce }
Returns boolean indicating whether sufficient time has passed for a request with
the given timestamp to be made
Returns boolean indicating whether sufficient time has passed for a request with the given timestamp to be made
&mut self
request
T
now
u64