Skip to main content

newest

Function newest 

Source
pub fn newest(notes: impl IntoIterator<Item = Note>, limit: usize) -> Vec<Note>
Expand description

The limit newest of notes, newest first, each note once.

A page asked of several relays comes back as each relay’s newest limit, which reach different distances into the past. Keeping only the newest limit of them all cuts the page where the busiest relay’s answer ends, so the next page, asked from that cut down, leaves no gap in any relay’s notes.