@@ -156,8 +156,10 @@ impl ImmutableHistoricalAccountStore {
156156 & self ,
157157 account : & StakeAddress ,
158158 ) -> Result < Option < Vec < RewardHistory > > > {
159- let mut immutable_rewards =
160- self . collect_partition :: < RewardHistory > ( & self . rewards_history , account. get_hash ( ) ) ?;
159+ let mut immutable_rewards = self . collect_partition :: < RewardHistory > (
160+ & self . rewards_history ,
161+ account. get_hash ( ) . as_ref ( ) ,
162+ ) ?;
161163
162164 self . merge_pending (
163165 account,
@@ -175,7 +177,7 @@ impl ImmutableHistoricalAccountStore {
175177 ) -> Result < Option < Vec < ActiveStakeHistory > > > {
176178 let mut immutable_active_stake = self . collect_partition :: < ActiveStakeHistory > (
177179 & self . active_stake_history ,
178- account. get_hash ( ) ,
180+ account. get_hash ( ) . as_ref ( ) ,
179181 ) ?;
180182
181183 self . merge_pending (
@@ -194,7 +196,7 @@ impl ImmutableHistoricalAccountStore {
194196 ) -> Result < Option < Vec < RegistrationUpdate > > > {
195197 let mut immutable_registrations = self . collect_partition :: < RegistrationUpdate > (
196198 & self . registration_history ,
197- account. get_hash ( ) ,
199+ account. get_hash ( ) . as_ref ( ) ,
198200 ) ?;
199201
200202 self . merge_pending (
@@ -211,8 +213,10 @@ impl ImmutableHistoricalAccountStore {
211213 & self ,
212214 account : & StakeAddress ,
213215 ) -> Result < Option < Vec < DelegationUpdate > > > {
214- let mut immutable_delegations = self
215- . collect_partition :: < DelegationUpdate > ( & self . delegation_history , account. get_hash ( ) ) ?;
216+ let mut immutable_delegations = self . collect_partition :: < DelegationUpdate > (
217+ & self . delegation_history ,
218+ account. get_hash ( ) . as_ref ( ) ,
219+ ) ?;
216220
217221 self . merge_pending (
218222 account,
@@ -228,8 +232,10 @@ impl ImmutableHistoricalAccountStore {
228232 & self ,
229233 account : & StakeAddress ,
230234 ) -> Result < Option < Vec < AccountWithdrawal > > > {
231- let mut immutable_mirs =
232- self . collect_partition :: < AccountWithdrawal > ( & self . mir_history , account. get_hash ( ) ) ?;
235+ let mut immutable_mirs = self . collect_partition :: < AccountWithdrawal > (
236+ & self . mir_history ,
237+ account. get_hash ( ) . as_ref ( ) ,
238+ ) ?;
233239
234240 self . merge_pending ( account, |e| e. mir_history . as_ref ( ) , & mut immutable_mirs) . await ;
235241
@@ -240,8 +246,10 @@ impl ImmutableHistoricalAccountStore {
240246 & self ,
241247 account : & StakeAddress ,
242248 ) -> Result < Option < Vec < AccountWithdrawal > > > {
243- let mut immutable_withdrawals = self
244- . collect_partition :: < AccountWithdrawal > ( & self . withdrawal_history , account. get_hash ( ) ) ?;
249+ let mut immutable_withdrawals = self . collect_partition :: < AccountWithdrawal > (
250+ & self . withdrawal_history ,
251+ account. get_hash ( ) . as_ref ( ) ,
252+ ) ?;
245253
246254 self . merge_pending (
247255 account,
@@ -258,7 +266,7 @@ impl ImmutableHistoricalAccountStore {
258266 account : & StakeAddress ,
259267 ) -> Result < Option < Vec < ShelleyAddress > > > {
260268 let mut immutable_addresses =
261- self . collect_partition :: < ShelleyAddress > ( & self . addresses , account. get_hash ( ) ) ?;
269+ self . collect_partition :: < ShelleyAddress > ( & self . addresses , account. get_hash ( ) . as_ref ( ) ) ?;
262270
263271 self . merge_pending ( account, |e| e. addresses . as_ref ( ) , & mut immutable_addresses) . await ;
264272
@@ -321,7 +329,7 @@ impl ImmutableHistoricalAccountStore {
321329
322330 fn make_epoch_key ( account : & StakeAddress , epoch : u32 ) -> [ u8 ; 32 ] {
323331 let mut key = [ 0u8 ; 32 ] ;
324- key[ ..28 ] . copy_from_slice ( & account. get_credential ( ) . get_hash ( ) ) ;
332+ key[ ..28 ] . copy_from_slice ( & account. get_credential ( ) . get_hash ( ) . as_ref ( ) ) ;
325333 key[ 28 ..32 ] . copy_from_slice ( & epoch. to_be_bytes ( ) ) ;
326334 key
327335 }
0 commit comments