@@ -27,17 +27,20 @@ use namada_core::masp::MaspEpoch;
27
27
use namada_core:: token:: MaspDigitPos ;
28
28
use namada_core:: token:: { Amount , DenominatedAmount , Denomination } ;
29
29
use namada_core:: uint:: Uint ;
30
+ #[ cfg( any( feature = "multicore" , test) ) ]
30
31
use namada_state:: iter_prefix_with_filter_map;
31
32
use namada_systems:: { parameters, trans_token} ;
32
33
34
+ #[ cfg( any( feature = "multicore" , test) ) ]
33
35
use crate :: storage_key:: {
34
- is_masp_conversion_key, masp_conversion_key_prefix, masp_kd_gain_key,
35
- masp_kp_gain_key, masp_last_inflation_key, masp_last_locked_amount_key,
36
- masp_locked_amount_target_key, masp_max_reward_rate_key,
37
- masp_reward_precision_key,
36
+ is_masp_conversion_key, masp_assets_hash_key, masp_conversion_key_prefix,
37
+ masp_token_map_key,
38
+ } ;
39
+ use crate :: storage_key:: {
40
+ masp_kd_gain_key, masp_kp_gain_key, masp_last_inflation_key,
41
+ masp_last_locked_amount_key, masp_locked_amount_target_key,
42
+ masp_max_reward_rate_key, masp_reward_precision_key,
38
43
} ;
39
- #[ cfg( any( feature = "multicore" , test) ) ]
40
- use crate :: storage_key:: { masp_assets_hash_key, masp_token_map_key} ;
41
44
#[ cfg( any( feature = "multicore" , test) ) ]
42
45
use crate :: { ConversionLeaf , Error , OptionExt , ResultExt } ;
43
46
use crate :: { Result , StorageRead , StorageWrite , WithConversionState } ;
@@ -525,8 +528,6 @@ fn apply_stored_conversion_updates<S>(storage: &mut S) -> Result<()>
525
528
where
526
529
S : StorageWrite + StorageRead + WithConversionState ,
527
530
{
528
- use masp_primitives:: transaction:: components:: I128Sum ;
529
-
530
531
let conversion_key_prefix = masp_conversion_key_prefix ( ) ;
531
532
let mut conversion_updates = BTreeMap :: new ( ) ;
532
533
// Read conversion updates from storage and store them in a map
@@ -555,8 +556,7 @@ where
555
556
) ;
556
557
continue ;
557
558
} ;
558
- // This operation will be expensive for large conversions
559
- leaf. conversion = From :: < I128Sum > :: from ( conv) ;
559
+ leaf. conversion = conv;
560
560
}
561
561
// Delete the updates now that they have been applied
562
562
storage. delete_prefix ( & conversion_key_prefix) ?;
0 commit comments