Use lazy_rent_collection directly (#22410) (#22920)

(cherry picked from commit 9bc2592da1)

Co-authored-by: Brooks Prumo <brooks@solana.com>
This commit is contained in:
mergify[bot]
2022-02-03 22:07:28 +00:00
committed by GitHub
parent 643442e830
commit 90a70d9b5b

View File

@ -4543,7 +4543,7 @@ impl Bank {
} }
fn collect_rent_eagerly(&self) { fn collect_rent_eagerly(&self) {
if !self.enable_eager_rent_collection() { if self.lazy_rent_collection.load(Relaxed) {
return; return;
} }
@ -4568,14 +4568,6 @@ impl Bank {
self.lazy_rent_collection.store(true, Relaxed); 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> { fn rent_collection_partitions(&self) -> Vec<Partition> {
if !self.use_fixed_collection_cycle() { if !self.use_fixed_collection_cycle() {
// This mode is for production/development/testing. // This mode is for production/development/testing.