fedimint_client::db

Function get_active_states

Source
pub async fn get_active_states(
    dbtx: &mut DatabaseTransaction<'_>,
    module_instance_id: ModuleInstanceId,
) -> Vec<(Vec<u8>, OperationId)>
Expand description

Reads all active states from the database and returns Vec<DynState>. TODO: It is unfortunate that we can’t read states by the module’s instance id so we are forced to return all active states. Once we do a db migration to add module_instance_id to ActiveStateKey, this can be improved to only read the module’s relevant states.