Skip to content

Commit

Permalink
Use lazy_rent_collection directly (solana-labs#22410)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Jan 10, 2022
1 parent eeec1ce commit 9bc2592
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4345,7 +4345,7 @@ impl Bank {
}

fn collect_rent_eagerly(&self) {
if !self.enable_eager_rent_collection() {
if self.lazy_rent_collection.load(Relaxed) {
return;
}

Expand All @@ -4370,14 +4370,6 @@ impl Bank {
self.lazy_rent_collection.store(true, Relaxed);
}

fn enable_eager_rent_collection(&self) -> bool {
if self.lazy_rent_collection.load(Relaxed) {
return false;
}

true
}

fn rent_collection_partitions(&self) -> Vec<Partition> {
if !self.use_fixed_collection_cycle() {
// This mode is for production/development/testing.
Expand Down

0 comments on commit 9bc2592

Please sign in to comment.