fedimint_testing_core::db

Function snapshot_db_migrations_client

source
pub async fn snapshot_db_migrations_client<'a, F, S, I>(
    snapshot_name: &str,
    data_prepare: F,
    state_machine_prepare: S,
) -> Result<()>
where F: Fn(Database) -> BoxFuture<'a, ()> + Send + Sync, S: Fn() -> (Vec<Vec<u8>>, Vec<Vec<u8>>) + Send + Sync, I: CommonModuleInit,
Expand description

Create the database backup directory for a client module. Two prepare functions are taken as parameters. data_prepare is expected to create any data that the client module uses and is stored in the isolated namespace. state_machine_prepare creates client state machine data that can be used for testing state machine migrations. This is created in the global namespace.