Skip to main content

reset_epochs

Function reset_epochs 

Source
pub fn reset_epochs(
    conn: &Connection,
    id: &str,
    epoch: u32,
    cuts: &[(u32, &Vector)],
) -> Result<()>
Expand description

Sets the collection’s key epoch and the ends of the epochs before it to exactly what the membership chain says now, in either direction: a removal that lost a fork to another entry leaves no epoch and no ends behind. cuts holds, for each epoch left, what each remaining member had written at it. Several statements: the caller makes them one (ops::sync_epoch and ops::store_chain do), so a failure part-way leaves nothing changed.