pub struct ForkchoiceUpdated {
pub payload_status: PayloadStatus,
pub payload_id: Option<PayloadId>,
}
Expand description
Represents a successfully processed forkchoice state update.
Note: this can still be INVALID if the provided payload was invalid.
Fields§
§payload_status: PayloadStatus
Represents the outcome of the validation of the payload, independently of the payload being valid or not.
payload_id: Option<PayloadId>
The identifier of the payload build process that was successfully initiated.
Implementations§
source§impl ForkchoiceUpdated
impl ForkchoiceUpdated
sourcepub const fn new(payload_status: PayloadStatus) -> Self
pub const fn new(payload_status: PayloadStatus) -> Self
Creates a new ForkchoiceUpdated with the given PayloadStatus.
sourcepub const fn from_status(status: PayloadStatusEnum) -> Self
pub const fn from_status(status: PayloadStatusEnum) -> Self
Creates a new ForkchoiceUpdated with the given PayloadStatusEnum.
sourcepub const fn with_latest_valid_hash(self, hash: B256) -> Self
pub const fn with_latest_valid_hash(self, hash: B256) -> Self
Sets the latest valid hash of the payload status.
sourcepub const fn with_payload_id(self, id: PayloadId) -> Self
pub const fn with_payload_id(self, id: PayloadId) -> Self
Sets the payload id of the created payload job.
sourcepub const fn is_syncing(&self) -> bool
pub const fn is_syncing(&self) -> bool
Returns true if the payload status is syncing.
sourcepub const fn is_invalid(&self) -> bool
pub const fn is_invalid(&self) -> bool
Returns true if the payload status is invalid.
Trait Implementations§
source§impl Clone for ForkchoiceUpdated
impl Clone for ForkchoiceUpdated
source§fn clone(&self) -> ForkchoiceUpdated
fn clone(&self) -> ForkchoiceUpdated
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ForkchoiceUpdated
impl Debug for ForkchoiceUpdated
source§impl<'de> Deserialize<'de> for ForkchoiceUpdated
impl<'de> Deserialize<'de> for ForkchoiceUpdated
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ForkchoiceUpdated
impl PartialEq for ForkchoiceUpdated
source§impl Serialize for ForkchoiceUpdated
impl Serialize for ForkchoiceUpdated
impl Eq for ForkchoiceUpdated
impl StructuralPartialEq for ForkchoiceUpdated
Auto Trait Implementations§
impl Freeze for ForkchoiceUpdated
impl RefUnwindSafe for ForkchoiceUpdated
impl Send for ForkchoiceUpdated
impl Sync for ForkchoiceUpdated
impl Unpin for ForkchoiceUpdated
impl UnwindSafe for ForkchoiceUpdated
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more