We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
latest_state
last_valid
1 parent 8653a47 commit abd8981Copy full SHA for abd8981
crates/engine/primitives/src/forkchoice.rs
@@ -75,8 +75,8 @@ impl ForkchoiceStateTracker {
75
/// Returns the latest received [`ForkchoiceState`].
76
///
77
/// Caution: this can be invalid.
78
- pub const fn latest_state(&self) -> Option<ForkchoiceState> {
79
- self.last_valid
+ pub fn latest_state(&self) -> Option<ForkchoiceState> {
+ self.latest.as_ref().map(|s| s.state)
80
}
81
82
/// Returns the last valid [`ForkchoiceState`].
@@ -122,7 +122,6 @@ impl ForkchoiceStateTracker {
122
/// Represents a forkchoice update and tracks the status we assigned to it.
123
#[derive(Debug, Clone)]
124
pub(crate) struct ReceivedForkchoiceState {
125
- #[cfg_attr(not(test), expect(dead_code))]
126
state: ForkchoiceState,
127
status: ForkchoiceStatus,
128
0 commit comments