Expand description
Utilities used by different relays.
Re-exports§
pub use error::Error;
pub use relay_loop::relay_loop;
pub use relay_loop::relay_metrics;
Modules§
- error
- initialize
- Relayer initialization functions.
- metrics
- relay_
loop
Macros§
- bail_
on_ arg_ error - Macro that returns (client, Err(error)) tuple from function if result is Err(error).
- bail_
on_ error - Macro that returns (client, Err(error)) tuple from function if result is Err(error).
Structs§
- Header
Id - Generic header Id.
Enums§
- Failed
Client - Which client has caused error.
- Process
Future Result - Future process result.
- Stringified
Maybe Connection Error - Stringified error that may be either connection-related or not.
- Tracked
Transaction Status - Final status of the tracked transaction.
Constants§
- CONNECTION_
ERROR_ DELAY - Delay after connection-related error happened before we’ll try reconnection again.
- MAX_
BACKOFF_ INTERVAL - Max delay after connection-unrelated error happened before we’ll try the same request again.
- STALL_
TIMEOUT - Default relay loop stall timeout. If transactions generated by relay are immortal, then this timeout is used.
Traits§
- Block
Number Base - Block number traits shared by all chains that relay is able to serve.
- Maybe
Connection Error - Error type that can signal connection errors.
- Transaction
Tracker - Transaction tracker.
- Unique
Saturated From - Just like
From
except that if the source value is too big to fit into the destination type then it’ll saturate the destination. - Unique
Saturated Into - Just like
Into
except that if the source value is too big to fit into the destination type then it’ll saturate the destination.
Functions§
- format_
ids - Compact format of IDs vector.
- interval
- Stream that emits item every
timeout_ms
milliseconds. - process_
future_ result - Process result of the future from a client.
- retry_
backoff - Exponential backoff for connection-unrelated errors retries.
Type Aliases§
- Tracked
Transaction Future - Future associated with
TransactionTracker
, monitoring the transaction status.