restore_backup

Function restore_backup 

Source
pub(super) fn restore_backup(
    non_finalized_state: NonFinalizedState,
    backup_dir_path: &PathBuf,
    finalized_state: &ZebraDb,
) -> NonFinalizedState
Expand description

Accepts an optional path to the non-finalized state backup directory and a handle to the database.

Looks for blocks above the finalized tip height in the backup directory (if a path was provided) and attempts to commit them to the non-finalized state.

Returns the resulting non-finalized state.