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