Function fedimint_client::db::migrate_state

source ยท
pub fn migrate_state(
    active_states: Vec<(Vec<u8>, OperationId)>,
    inactive_states: Vec<(Vec<u8>, OperationId)>,
    migrate: fn(_: OperationId, _: &mut Cursor<&[u8]>) -> Result<Option<(Vec<u8>, OperationId)>>,
) -> Result<Option<(Vec<(Vec<u8>, OperationId)>, Vec<(Vec<u8>, OperationId)>)>>
Expand description

Migrates a particular state by looping over all active and inactive states. If the migrate closure returns None, this state was not migrated and should be added to the new state machine vectors.