File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -818,6 +818,17 @@ fd_banks_advance_root( fd_banks_t * banks,
818818 #undef HAS_COW_0
819819 #undef HAS_COW_1
820820
821+ /* It is possible for a bank that never finished replaying to be
822+ pruned away. If the bank was never frozen, then it's possible
823+ that the bank still owns a cost tracker pool element. If this
824+ is the case, we need to release the pool element. */
825+ if ( head -> cost_tracker_pool_idx != fd_bank_cost_tracker_pool_idx_null ( fd_bank_get_cost_tracker_pool ( head )) ) {
826+ FD_TEST ( !(head -> flags & FD_BANK_FLAGS_FROZEN ) && head -> flags & FD_BANK_FLAGS_REPLAYABLE );
827+ FD_LOG_DEBUG (( "releasing cost tracker pool element for bank at index %lu at slot %lu" , head -> idx , fd_bank_slot_get ( head ) ));
828+ fd_bank_cost_tracker_pool_idx_release ( fd_bank_get_cost_tracker_pool ( head ), head -> cost_tracker_pool_idx );
829+ head -> cost_tracker_pool_idx = fd_bank_cost_tracker_pool_idx_null ( fd_bank_get_cost_tracker_pool ( head ) );
830+ }
831+
821832 head -> flags = 0UL ;
822833 fd_banks_pool_ele_release ( bank_pool , head );
823834 head = next ;
You can’t perform that action at this time.
0 commit comments