Skip to main content

spawn_rpc_proxy_blocking_first_submission

Function spawn_rpc_proxy_blocking_first_submission 

Source
pub async fn spawn_rpc_proxy_blocking_first_submission(
    endpoint: String,
    method: &'static str,
    forward: bool,
) -> (String, Arc<Mutex<Vec<Value>>>, Arc<Notify>, Arc<Notify>)
Expand description

Spawns an RPC proxy that records the params of every request to method and holds the first one until release is notified, then answers it with 503 Service Unavailable.

reached is notified once the first request is held. When forward is true, that request is forwarded before it is held and the upstream response is withheld.