You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: view_client.rs
    path of file: ./repos/nearcore/chain/client/src
    
    the code of the file until where you have to start completion: //! Readonly view of the chain and state of the database.
//! Useful for querying from RPC.

use crate::{
    metrics, sync, GetChunk, GetExecutionOutcomeResponse, GetNextLightClientBlock, GetStateChanges,
    GetStateChangesInBlock, GetValidatorInfo, GetValidatorOrdered,
};
use actix::{Actor, Addr, Handler, SyncArbiter, SyncContext};
use near_async::messaging::CanSend;
use near_async::time::{Clock, Duration, Instant};
use near_chain::types::{RuntimeAdapter, Tip};
use near_chain::{
    get_epoch_block_producers_
    
    fn throttle_state_sync_request(&self) -> bool {
        let mut cache = self.state_request_cache.lock().expect(POISONED_LOCK_ERR);
        let now = self.clock.now();
        while let Some(&instant) = cache.front() {
            if now - instant > self.config.view_client_throttle_period {
                cache.pop_front();
            } else {
                // Assume that time is linear. While in different threads there might be some small differences,
                // it should not matter in practice.
                break;
            }
        }
        if cache.len() >= Self::MAX_NUM_STATE_REQUESTS {
            return true;
        }
        cache.push_back(now);
        false
    }