diff --git a/runtime/src/accounts_background_service.rs b/runtime/src/accounts_background_service.rs index 4b339a0fb8..6a863218f6 100644 --- a/runtime/src/accounts_background_service.rs +++ b/runtime/src/accounts_background_service.rs @@ -158,7 +158,7 @@ impl SnapshotRequestHandler { ancestors: None, use_write_cache: false, epoch_schedule: snapshot_root_bank.epoch_schedule(), - rent_collector: &snapshot_root_bank.rent_collector(), + rent_collector: snapshot_root_bank.rent_collector(), }, ).unwrap(); assert_eq!(previous_hash, this_hash); diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 8164f8bfe9..2884fda514 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -6155,8 +6155,8 @@ impl Bank { *self.inflation.read().unwrap() } - pub fn rent_collector(&self) -> RentCollector { - self.rent_collector.clone() + pub fn rent_collector(&self) -> &RentCollector { + &self.rent_collector } /// Return the total capitalization of the Bank diff --git a/runtime/src/snapshot_package.rs b/runtime/src/snapshot_package.rs index 95f5aacb4e..87bf2038b6 100644 --- a/runtime/src/snapshot_package.rs +++ b/runtime/src/snapshot_package.rs @@ -112,7 +112,7 @@ impl AccountsPackage { snapshot_type, accounts: bank.accounts(), epoch_schedule: *bank.epoch_schedule(), - rent_collector: bank.rent_collector(), + rent_collector: bank.rent_collector().clone(), }) } }