Function feed_data_from_parsed

Source
pub fn feed_data_from_parsed(
    parsed: &ParsedFeedView,
    package: Nanoseconds,
    now: Nanoseconds,
    max_ahead_s: u64,
) -> Option<FeedData>
Expand description

Fallibly build a storable FeedData from a verified feed, owning every intrinsic validity rule. Returns None for missing price or exponent, missing or invalid spot/EMA confidence, missing EMA price, or an effective publish timestamp more than max_ahead_s seconds beyond now. Anti-replay is relational and handled by the caller.

EMA is required: a spot-only signed payload must never overwrite a stored feed and drop its EMA. The adapter’s stateless verify_update does not call this projection and permits spot-only payloads.