reth_payload_primitives

Function validate_withdrawals_presence

Source
pub fn validate_withdrawals_presence<T: EthereumHardforks>(
    chain_spec: &T,
    version: EngineApiMessageVersion,
    message_validation_kind: MessageValidationKind,
    timestamp: u64,
    has_withdrawals: bool,
) -> Result<(), EngineObjectValidationError>
Expand description

Validates the presence of the withdrawals field according to the payload timestamp. After Shanghai, withdrawals field must be Some. Before Shanghai, withdrawals field must be None;