Skip to main content

request_timeout_for_method

Function request_timeout_for_method 

Source
fn request_timeout_for_method(method: &ApiMethod) -> Duration
Expand description

Request timeout strategy: long-poll endpoints (await_* / wait_*) get the long bound, everything else gets the default. The string match is a heuristic; it covers all currently-defined fedimint long-poll endpoints and stays correct if new ones follow the existing naming convention. False positives (a non-long-poll endpoint that happens to match the prefix) just give that one method a longer leash; the worse case is a false negative — a long-poll method that doesn’t match either prefix would get the 60s default and fail fast on legitimate waits, but the upstream retry loop would reconnect and try again.