File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -617,20 +617,20 @@ impl PoolMap {
617617
618618 let mut iter = evict_candidates. iter ( ) ;
619619 while ancestors_count > self . max_ancestors_count {
620- if let Some ( next_id) = iter. next ( ) {
621- let removed = self . remove_entry_and_descendants ( next_id) ;
622- for removed_id in removed. iter ( ) . map ( |entry| entry. proposal_short_id ( ) ) {
623- parents. remove ( & removed_id) ;
624- }
625- ancestors_count = self
626- . links
627- . calc_relation_ids ( parents. clone ( ) , Relation :: Parents )
628- . len ( )
629- + 1 ;
630- evicted. extend ( removed) ;
631- } else {
620+ let Some ( next_id) = iter. next ( ) else {
632621 break ;
622+ } ;
623+
624+ let removed = self . remove_entry_and_descendants ( next_id) ;
625+ for removed_id in removed. iter ( ) . map ( |entry| entry. proposal_short_id ( ) ) {
626+ parents. remove ( & removed_id) ;
633627 }
628+ ancestors_count = self
629+ . links
630+ . calc_relation_ids ( parents. clone ( ) , Relation :: Parents )
631+ . len ( )
632+ + 1 ;
633+ evicted. extend ( removed) ;
634634 }
635635
636636 // some txs in `parents` are removed, now `ancestors` need to re-caculate,
You can’t perform that action at this time.
0 commit comments