Struct ForkchoiceStateTracker
pub struct ForkchoiceStateTracker { /* private fields */ }Expand description
The struct that keeps track of the received forkchoice state and their status.
Source§
Source
Sets the latest forkchoice state that we received.
If the status is VALID, we also update the last valid forkchoice state and set the
sync_target to None, since we’re now fully synced.
Source
Returns the last valid head hash.
Source
Returns the latest received [ForkchoiceState].
Caution: this can be invalid.
Source
Returns the last valid [ForkchoiceState].
Source
Returns the last valid finalized hash.
This will return None:
- If either there is no valid finalized forkchoice state,
- Or the finalized hash for the latest valid forkchoice state is zero.
Source
Returns the last received ForkchoiceState to which we need to sync.
Source
Returns the sync target finalized hash.
This will return None:
- If either there is no sync target forkchoice state,
- Or the finalized hash for the sync target forkchoice state is zero.
Source
Returns true if no forkchoice state has been received yet.
§
§
Causes self to use its Binary implementation when Debug-formatted.
§
Causes self to use its Display implementation when
Debug-formatted.
§
Causes self to use its LowerExp implementation when
Debug-formatted.
§
Causes self to use its LowerHex implementation when
Debug-formatted.
§
Causes self to use its Octal implementation when Debug-formatted.
§
Causes self to use its Pointer implementation when
Debug-formatted.
§
Causes self to use its UpperExp implementation when
Debug-formatted.
§
Causes self to use its UpperHex implementation when
Debug-formatted.
§
§
Available on crate feature propagate-header only.
Propagate a header from the request to the response. Read more
§
Available on crate feature add-extension only.
§
Available on crate feature map-request-body only.
Apply a transformation to the request body. Read more
§
Available on crate feature map-response-body only.
Apply a transformation to the response body. Read more
§
Available on crate features compression-br or compression-deflate or compression-gzip or compression-zstd only.
Compresses response bodies. Read more
§
Available on crate features decompression-br or decompression-deflate or decompression-gzip or decompression-zstd only.
Decompress response bodies. Read more
§
Available on crate feature trace only.
High level tracing that classifies responses using HTTP status codes. Read more
§
Available on crate feature trace only.
High level tracing that classifies responses using gRPC headers. Read more
§
Available on crate feature follow-redirect only.
Available on crate feature sensitive-headers only.
Available on crate feature sensitive-headers only.
Available on crate feature sensitive-headers only.
Available on crate feature set-header only.
Insert a header into the request, if the header is not already present. Read more
Available on crate feature set-header only.
Insert a header into the response, if the header is not already present. Read more
§
Available on crate feature request-id only.
Add request id header and extension, using x-request-id as the header name. Read more
§
Available on crate feature request-id only.
Propgate request ids from requests to responses. Read more
§
Available on crate feature request-id only.
Propgate request ids from requests to responses, using x-request-id as the header name. Read more
§
Available on crate feature catch-panic only.
Catch panics and convert them into 500 Internal Server responses. Read more
§
§
Calls .tap() only in debug builds, and is erased in release builds.
§
Calls .tap_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_borrow() only in debug builds, and is erased in release
builds.
§
Calls .tap_borrow_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_ref() only in debug builds, and is erased in release
builds.
§
Calls .tap_ref_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_deref() only in debug builds, and is erased in release
builds.
§
Calls .tap_deref_mut() only in debug builds, and is erased in release
builds.
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 291 bytes