mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-26 01:03:40 +00:00
Add StatePayloadStatus to BlockReplayer
This commit is contained in:
@@ -12,6 +12,7 @@ mod payload;
|
||||
mod signed_bls_to_execution_change;
|
||||
mod signed_execution_payload_bid;
|
||||
mod signed_execution_payload_envelope;
|
||||
mod state_payload_status;
|
||||
|
||||
pub use bls_to_execution_change::BlsToExecutionChange;
|
||||
pub use eth1_data::Eth1Data;
|
||||
@@ -41,3 +42,4 @@ pub use payload::{
|
||||
pub use signed_bls_to_execution_change::SignedBlsToExecutionChange;
|
||||
pub use signed_execution_payload_bid::SignedExecutionPayloadBid;
|
||||
pub use signed_execution_payload_envelope::SignedExecutionPayloadEnvelope;
|
||||
pub use state_payload_status::StatePayloadStatus;
|
||||
|
||||
18
consensus/types/src/execution/state_payload_status.rs
Normal file
18
consensus/types/src/execution/state_payload_status.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Payload status as it applies to a `BeaconState` post-Gloas.
|
||||
///
|
||||
/// A state can either be a post-state for a block (in which case we call it `Pending`) or a
|
||||
/// payload envelope (`Full`). When handling states it is often necessary to know which of these
|
||||
/// two variants is required.
|
||||
///
|
||||
/// Note that states at skipped slots could be either `Pending` or `Full`, depending on whether
|
||||
/// the payload for the most-recently applied block was also applied.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum StatePayloadStatus {
|
||||
/// For states produced by `process_block` executed on a `BeaconBlock`.
|
||||
Pending,
|
||||
/// For states produced by `process_execution_payload` on a `ExecutionPayloadEnvelope`.
|
||||
Full,
|
||||
}
|
||||
Reference in New Issue
Block a user