@@ -87,7 +87,7 @@ impl ImmutableHistoricalAccountStore {
8787 if config. store_rewards_history {
8888 batch. insert (
8989 & self . rewards_history ,
90- & epoch_key,
90+ epoch_key,
9191 to_vec ( & entry. reward_history ) ?,
9292 ) ;
9393 }
@@ -96,44 +96,44 @@ impl ImmutableHistoricalAccountStore {
9696 if config. store_active_stake_history {
9797 batch. insert (
9898 & self . active_stake_history ,
99- & epoch_key,
99+ epoch_key,
100100 to_vec ( & entry. active_stake_history ) ?,
101101 ) ;
102102 }
103103
104104 // Persist account delegation updates
105105 if config. store_delegation_history {
106106 if let Some ( updates) = & entry. delegation_history {
107- batch. insert ( & self . delegation_history , & epoch_key, to_vec ( & updates) ?) ;
107+ batch. insert ( & self . delegation_history , epoch_key, to_vec ( updates) ?) ;
108108 }
109109 }
110110
111111 // Persist account registration updates
112112 if config. store_registration_history {
113113 if let Some ( updates) = & entry. registration_history {
114- batch. insert ( & self . registration_history , & epoch_key, to_vec ( & updates) ?) ;
114+ batch. insert ( & self . registration_history , epoch_key, to_vec ( updates) ?) ;
115115 }
116116 }
117117
118118 // Persist withdrawal updates
119119 if config. store_withdrawal_history {
120120 if let Some ( updates) = & entry. withdrawal_history {
121- batch. insert ( & self . withdrawal_history , & epoch_key, to_vec ( & updates) ?) ;
121+ batch. insert ( & self . withdrawal_history , epoch_key, to_vec ( updates) ?) ;
122122 }
123123 }
124124
125125 // Persist MIR updates
126126 if config. store_mir_history {
127127 if let Some ( updates) = & entry. mir_history {
128- batch. insert ( & self . mir_history , & epoch_key, to_vec ( & updates) ?) ;
128+ batch. insert ( & self . mir_history , epoch_key, to_vec ( updates) ?) ;
129129 }
130130 }
131131
132132 // Persist address updates
133133 // TODO: Deduplicate addresses across epochs
134134 if config. store_addresses {
135135 if let Some ( updates) = & entry. addresses {
136- batch. insert ( & self . addresses , & epoch_key, to_vec ( & updates) ?) ;
136+ batch. insert ( & self . addresses , epoch_key, to_vec ( updates) ?) ;
137137 }
138138 }
139139 }
@@ -157,7 +157,7 @@ impl ImmutableHistoricalAccountStore {
157157 account : & StakeAddress ,
158158 ) -> Result < Option < Vec < RewardHistory > > > {
159159 let mut immutable_rewards =
160- self . collect_partition :: < RewardHistory > ( & self . rewards_history , & account. get_hash ( ) ) ?;
160+ self . collect_partition :: < RewardHistory > ( & self . rewards_history , account. get_hash ( ) ) ?;
161161
162162 self . merge_pending (
163163 account,
@@ -175,7 +175,7 @@ impl ImmutableHistoricalAccountStore {
175175 ) -> Result < Option < Vec < ActiveStakeHistory > > > {
176176 let mut immutable_active_stake = self . collect_partition :: < ActiveStakeHistory > (
177177 & self . active_stake_history ,
178- & account. get_hash ( ) ,
178+ account. get_hash ( ) ,
179179 ) ?;
180180
181181 self . merge_pending (
@@ -194,7 +194,7 @@ impl ImmutableHistoricalAccountStore {
194194 ) -> Result < Option < Vec < RegistrationUpdate > > > {
195195 let mut immutable_registrations = self . collect_partition :: < RegistrationUpdate > (
196196 & self . registration_history ,
197- & account. get_hash ( ) ,
197+ account. get_hash ( ) ,
198198 ) ?;
199199
200200 self . merge_pending (
@@ -212,7 +212,7 @@ impl ImmutableHistoricalAccountStore {
212212 account : & StakeAddress ,
213213 ) -> Result < Option < Vec < DelegationUpdate > > > {
214214 let mut immutable_delegations = self
215- . collect_partition :: < DelegationUpdate > ( & self . delegation_history , & account. get_hash ( ) ) ?;
215+ . collect_partition :: < DelegationUpdate > ( & self . delegation_history , account. get_hash ( ) ) ?;
216216
217217 self . merge_pending (
218218 account,
@@ -229,21 +229,19 @@ impl ImmutableHistoricalAccountStore {
229229 account : & StakeAddress ,
230230 ) -> Result < Option < Vec < AccountWithdrawal > > > {
231231 let mut immutable_mirs =
232- self . collect_partition :: < AccountWithdrawal > ( & self . mir_history , & account. get_hash ( ) ) ?;
232+ self . collect_partition :: < AccountWithdrawal > ( & self . mir_history , account. get_hash ( ) ) ?;
233233
234234 self . merge_pending ( account, |e| e. mir_history . as_ref ( ) , & mut immutable_mirs) . await ;
235235
236236 Ok ( ( !immutable_mirs. is_empty ( ) ) . then_some ( immutable_mirs) )
237237 }
238238
239- pub async fn _get_withdrawal_history (
239+ pub async fn get_withdrawal_history (
240240 & self ,
241241 account : & StakeAddress ,
242242 ) -> Result < Option < Vec < AccountWithdrawal > > > {
243- let mut immutable_withdrawals = self . collect_partition :: < AccountWithdrawal > (
244- & self . withdrawal_history ,
245- & account. get_hash ( ) ,
246- ) ?;
243+ let mut immutable_withdrawals = self
244+ . collect_partition :: < AccountWithdrawal > ( & self . withdrawal_history , account. get_hash ( ) ) ?;
247245
248246 self . merge_pending (
249247 account,
@@ -260,7 +258,7 @@ impl ImmutableHistoricalAccountStore {
260258 account : & StakeAddress ,
261259 ) -> Result < Option < Vec < ShelleyAddress > > > {
262260 let mut immutable_addresses =
263- self . collect_partition :: < ShelleyAddress > ( & self . addresses , & account. get_hash ( ) ) ?;
261+ self . collect_partition :: < ShelleyAddress > ( & self . addresses , account. get_hash ( ) ) ?;
264262
265263 self . merge_pending ( account, |e| e. addresses . as_ref ( ) , & mut immutable_addresses) . await ;
266264
0 commit comments