@@ -491,7 +491,6 @@ impl PartialEq for Bank {
491491 return true ;
492492 }
493493 let Self {
494- bank_freeze_or_destruction_incremented : _,
495494 rc : _,
496495 status_cache : _,
497496 blockhash_queue,
@@ -820,9 +819,6 @@ pub struct Bank {
820819
821820 pub check_program_modification_slot : bool ,
822821
823- /// true when the bank's freezing or destruction has completed
824- bank_freeze_or_destruction_incremented : AtomicBool ,
825-
826822 epoch_reward_status : EpochRewardStatus ,
827823}
828824
@@ -1029,7 +1025,6 @@ impl Bank {
10291025
10301026 fn default_with_accounts ( accounts : Accounts ) -> Self {
10311027 let mut bank = Self {
1032- bank_freeze_or_destruction_incremented : AtomicBool :: default ( ) ,
10331028 incremental_snapshot_persistence : None ,
10341029 rc : BankRc :: new ( accounts, Slot :: default ( ) ) ,
10351030 status_cache : Arc :: < RwLock < BankStatusCache > > :: default ( ) ,
@@ -1092,7 +1087,6 @@ impl Bank {
10921087 epoch_reward_status : EpochRewardStatus :: default ( ) ,
10931088 } ;
10941089
1095- bank. bank_created ( ) ;
10961090 let accounts_data_size_initial = bank. get_total_accounts_stats ( ) . unwrap ( ) . data_len as u64 ;
10971091 bank. accounts_data_size_initial = accounts_data_size_initial;
10981092
@@ -1359,9 +1353,7 @@ impl Bank {
13591353 let ( feature_set, feature_set_time_us) = measure_us ! ( parent. feature_set. clone( ) ) ;
13601354
13611355 let accounts_data_size_initial = parent. load_accounts_data_size ( ) ;
1362- parent. bank_created ( ) ;
13631356 let mut new = Self {
1364- bank_freeze_or_destruction_incremented : AtomicBool :: default ( ) ,
13651357 incremental_snapshot_persistence : None ,
13661358 rc,
13671359 status_cache,
@@ -1728,27 +1720,6 @@ impl Bank {
17281720 self . vote_only_bank
17291721 }
17301722
1731- fn bank_created ( & self ) {
1732- self . rc
1733- . accounts
1734- . accounts_db
1735- . bank_progress
1736- . increment_bank_creation_count ( ) ;
1737- }
1738-
1739- fn bank_frozen_or_destroyed ( & self ) {
1740- if !self
1741- . bank_freeze_or_destruction_incremented
1742- . swap ( true , AcqRel )
1743- {
1744- self . rc
1745- . accounts
1746- . accounts_db
1747- . bank_progress
1748- . increment_bank_frozen_or_destroyed ( ) ;
1749- }
1750- }
1751-
17521723 /// Like `new_from_parent` but additionally:
17531724 /// * Doesn't assume that the parent is anywhere near `slot`, parent could be millions of slots
17541725 /// in the past
@@ -1832,7 +1803,6 @@ impl Bank {
18321803 let feature_set = new ( ) ;
18331804 let mut bank = Self {
18341805 incremental_snapshot_persistence : fields. incremental_snapshot_persistence ,
1835- bank_freeze_or_destruction_incremented : AtomicBool :: default ( ) ,
18361806 rc : bank_rc,
18371807 status_cache : new ( ) ,
18381808 blockhash_queue : RwLock :: new ( fields. blockhash_queue ) ,
@@ -1893,8 +1863,6 @@ impl Bank {
18931863 check_program_modification_slot : false ,
18941864 epoch_reward_status : EpochRewardStatus :: default ( ) ,
18951865 } ;
1896- bank. bank_created ( ) ;
1897-
18981866 bank. finish_init (
18991867 genesis_config,
19001868 additional_builtins,
@@ -3774,7 +3742,6 @@ impl Bank {
37743742 self . freeze_started . store ( true , Relaxed ) ;
37753743 * hash = self . hash_internal_state ( ) ;
37763744 self . rc . accounts . accounts_db . mark_slot_frozen ( self . slot ( ) ) ;
3777- self . bank_frozen_or_destroyed ( ) ;
37783745 }
37793746 }
37803747
@@ -8333,7 +8300,6 @@ impl TotalAccountsStats {
83338300
83348301impl Drop for Bank {
83358302 fn drop ( & mut self ) {
8336- self . bank_frozen_or_destroyed ( ) ;
83378303 if let Some ( drop_callback) = self . drop_callback . read ( ) . unwrap ( ) . 0 . as_ref ( ) {
83388304 drop_callback. callback ( self ) ;
83398305 } else {
0 commit comments