fedimint_client::db

Function get_inactive_states

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

Reads all inactive 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 inactive states. Once we do a db migration to add module_instance_id to InactiveStateKey, this can be improved to only read the module’s relevant states.