reth_node_builder::payload

Function validate_withdrawals_presence

pub fn validate_withdrawals_presence<T>(
    chain_spec: &T,
    version: EngineApiMessageVersion,
    message_validation_kind: MessageValidationKind,
    timestamp: u64,
    has_withdrawals: bool,
) -> Result<(), EngineObjectValidationError>
where T: EthereumHardforks,
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;