[][src]Function grin_chain::pipe::rewind_and_apply_fork

pub fn rewind_and_apply_fork(
    header: &BlockHeader,
    ext: &mut ExtensionPair,
    batch: &Batch
) -> Result<(), Error>

Utility function to handle forks. From the forked block, jump backward to find to fork point. Rewind the txhashset to the fork point and apply all necessary blocks prior to the one being processed to set the txhashset in the expected state.