chore: add docs for PayloadStatusEnum (#2132)

This commit is contained in:
Dan Cline
2023-04-05 16:35:33 -04:00
committed by GitHub
parent 7eb7f7458a
commit f4fc9b5216

View File

@@ -226,12 +226,26 @@ impl PayloadStatus {
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "status", rename_all = "SCREAMING_SNAKE_CASE")]
pub enum PayloadStatusEnum {
/// VALID is returned by the engine API in the following calls:
/// - newPayloadV1: if the payload was already known or was just validated and executed
/// - forkchoiceUpdateV1: if the chain accepted the reorg (might ignore if it's stale)
Valid,
/// INVALID is returned by the engine API in the following calls:
/// - newPayloadV1: if the payload failed to execute on top of the local chain
/// - forkchoiceUpdateV1: if the new head is unknown, pre-merge, or reorg to it fails
Invalid {
#[serde(rename = "validationError")]
validation_error: String,
},
/// SYNCING is returned by the engine API in the following calls:
/// - newPayloadV1: if the payload was accepted on top of an active sync
/// - forkchoiceUpdateV1: if the new head was seen before, but not part of the chain
Syncing,
/// ACCEPTED is returned by the engine API in the following calls:
/// - newPayloadV1: if the payload was accepted, but not processed (side chain)
Accepted,
InvalidBlockHash {
#[serde(rename = "validationError")]