Skip to main content

evaluate

Function evaluate 

Source
pub async fn evaluate(servers: &[&str]) -> Result<Box<dyn Handler>>
Expand description

Calls every server with eth_blockNumber, measures response time, and returns a Handler backed by the servers that responded.

With a single server, the returned handler is that one Rpc (and an error is returned if it fails to respond). With multiple servers, the result is an RpcList of every server that answered within a short grace period (200 ms) of the first success (or all that eventually answer, whichever comes first).