MCPcopy Create free account
hub / github.com/base/base / validate_against_parent

Function validate_against_parent

crates/execution/node/src/engine.rs:636–648  ·  view source on GitHub ↗
(
        validator: &BaseEngineValidator<BaseTxEnvelope, BaseChainSpec>,
        timestamp: u64,
        timestamp_millis_part: u16,
        parent_timestamp: u64,
    )

Source from the content-addressed store, hash-verified

634 }
635
636 fn validate_against_parent(
637 validator: &BaseEngineValidator<BaseTxEnvelope, BaseChainSpec>,
638 timestamp: u64,
639 timestamp_millis_part: u16,
640 parent_timestamp: u64,
641 ) -> Result<(), InvalidPayloadAttributesError> {
642 let mut attributes = denim_attributes(timestamp);
643 add_base_time_transaction(&mut attributes, timestamp_millis_part);
644 let header = Header { number: 8, timestamp: parent_timestamp, ..Default::default() };
645
646 <engine::BaseEngineValidator<_, _> as PayloadValidator<BaseEngineTypes>>::
647 validate_payload_attributes_against_header(validator, &attributes, &header)
648 }
649
650 #[test]
651 fn test_payload_attributes_post_denim_accept_same_second() {

Callers

nothing calls this directly

Calls 2

denim_attributesFunction · 0.85

Tested by

no test coverage detected