Skip to main content

rate_wait

Function rate_wait 

Source
pub fn rate_wait(strikes: u32, floor: Option<u64>) -> i64
Expand description

The token mint wait after the strikes-th 429 in a row (strikes >= 1) with the server’s Retry-After floor: doubling from RATE_FIRST_S up to RATE_MAX_WAIT_S, never shorter than the floor (which is kept above the cap too, up to RATE_FLOOR_MAX_S: a broken or hostile answer cannot stop every call for weeks).