pub fn garbage_collect(&mut self) {
        // get the keys of the entries with the revocation transactions.
        let garbage: Vec<ChainId> = self
            .entries
            .iter()
            .filter(|(_, entry)| entry.revoke.is_some())
            .map(|(c, _)| *c)
            .collect();

        // remove the garbage entries from the database.
        garbage.iter().for_each(|c| {
            self.entries.remove(c);
        });
    }
/// Sorts through all of the vault entries and garbage collects any revoked entries.
Sorts through all of the vault entries and garbage collects any revoked entries.
Sorts through all of the vault entries and garbage collects any revoked entries .
pub fn garbage_collect(&mut self) {
        // get the keys of the entries with the revocation transactions.
        let garbage: Vec<ChainId> = self
            .entries
            .iter()
            .filter(|(_, entry)| entry.revoke.is_some())
            .map(|(c, _)| *c)
            .collect();
        // remove the garbage entries from the database.
        garbage.iter().for_each(|c| {
            self.entries.remove(c);
        });
    }
pub fn garbage_collect ( & mut self ) { // get the keys of the entries with the revocation transactions. let garbage : Vec < ChainId > = self . entries . iter ( ) . filter ( | ( _ , entry ) | entry . revoke . is_some ( ) ) . map ( | ( c , _ ) | * c ) . collect ( ) ; // remove the garbage entries from the database. garbage . iter ( ) . for_each ( | c | { self . entries . remove ( c ) ; } ) ; }
Sorts through all of the vault entries and garbage collects any revoked entries.
Sorts through all of the vault entries and garbage collects any revoked entries .
&mut self
&mut self