@@ -526,11 +526,10 @@ impl VirtualMachine {
526526 hint_processor : & mut dyn HintProcessor ,
527527 exec_scopes : & mut ExecutionScopes ,
528528 hint_datas : & [ Box < dyn Any > ] ,
529- constants : & HashMap < String , Felt252 > ,
530529 ) -> Result < ( ) , VirtualMachineError > {
531530 for ( hint_index, hint_data) in hint_datas. iter ( ) . enumerate ( ) {
532531 hint_processor
533- . execute_hint ( self , exec_scopes, hint_data, constants )
532+ . execute_hint ( self , exec_scopes, hint_data)
534533 . map_err ( |err| VirtualMachineError :: Hint ( Box :: new ( ( hint_index, err) ) ) ) ?
535534 }
536535 Ok ( ( ) )
@@ -543,7 +542,6 @@ impl VirtualMachine {
543542 exec_scopes : & mut ExecutionScopes ,
544543 hint_datas : & mut Vec < Box < dyn Any > > ,
545544 hint_ranges : & mut HashMap < Relocatable , HintRange > ,
546- constants : & HashMap < String , Felt252 > ,
547545 ) -> Result < ( ) , VirtualMachineError > {
548546 // Check if there is a hint range for the current pc
549547 if let Some ( ( s, l) ) = hint_ranges. get ( & self . run_context . pc ) {
@@ -556,7 +554,6 @@ impl VirtualMachine {
556554 self ,
557555 exec_scopes,
558556 hint_datas. get ( idx) . ok_or ( VirtualMachineError :: Unexpected ) ?,
559- constants,
560557 )
561558 . map_err ( |err| VirtualMachineError :: Hint ( Box :: new ( ( idx - s, err) ) ) ) ?;
562559 // Update the hint_ranges & hint_datas with the hints added by the executed hint
@@ -617,15 +614,14 @@ impl VirtualMachine {
617614 #[ cfg( feature = "extensive_hints" ) ] hint_datas : & mut Vec < Box < dyn Any > > ,
618615 #[ cfg( not( feature = "extensive_hints" ) ) ] hint_datas : & [ Box < dyn Any > ] ,
619616 #[ cfg( feature = "extensive_hints" ) ] hint_ranges : & mut HashMap < Relocatable , HintRange > ,
620- constants : & HashMap < String , Felt252 > ,
617+ # [ cfg ( feature = "test_utils" ) ] constants : & HashMap < String , Felt252 > ,
621618 ) -> Result < ( ) , VirtualMachineError > {
622619 self . step_hint (
623620 hint_processor,
624621 exec_scopes,
625622 hint_datas,
626623 #[ cfg( feature = "extensive_hints" ) ]
627624 hint_ranges,
628- constants,
629625 ) ?;
630626
631627 #[ cfg( feature = "test_utils" ) ]
@@ -3271,6 +3267,7 @@ mod tests {
32713267 & mut Vec :: new( ) ,
32723268 #[ cfg( feature = "extensive_hints" ) ]
32733269 & mut HashMap :: new( ) ,
3270+ #[ cfg( feature = "test_utils" ) ]
32743271 & HashMap :: new( ) ,
32753272 ) ,
32763273 Ok ( ( ) )
@@ -3508,6 +3505,7 @@ mod tests {
35083505 & mut Vec :: new( ) ,
35093506 #[ cfg( feature = "extensive_hints" ) ]
35103507 & mut HashMap :: new( ) ,
3508+ #[ cfg( feature = "test_utils" ) ]
35113509 & HashMap :: new( ) ,
35123510 ) ,
35133511 Ok ( ( ) )
@@ -3592,6 +3590,7 @@ mod tests {
35923590 & mut Vec :: new( ) ,
35933591 #[ cfg( feature = "extensive_hints" ) ]
35943592 & mut HashMap :: new( ) ,
3593+ #[ cfg( feature = "test_utils" ) ]
35953594 & HashMap :: new( )
35963595 ) ,
35973596 Ok ( ( ) )
@@ -3701,6 +3700,7 @@ mod tests {
37013700 & mut Vec :: new( ) ,
37023701 #[ cfg( feature = "extensive_hints" ) ]
37033702 & mut HashMap :: new( ) ,
3703+ #[ cfg( feature = "test_utils" ) ]
37043704 & HashMap :: new( )
37053705 ) ,
37063706 Ok ( ( ) )
@@ -3724,6 +3724,7 @@ mod tests {
37243724 & mut Vec :: new( ) ,
37253725 #[ cfg( feature = "extensive_hints" ) ]
37263726 & mut HashMap :: new( ) ,
3727+ #[ cfg( feature = "test_utils" ) ]
37273728 & HashMap :: new( )
37283729 ) ,
37293730 Ok ( ( ) )
@@ -3748,6 +3749,7 @@ mod tests {
37483749 & mut Vec :: new( ) ,
37493750 #[ cfg( feature = "extensive_hints" ) ]
37503751 & mut HashMap :: new( ) ,
3752+ #[ cfg( feature = "test_utils" ) ]
37513753 & HashMap :: new( )
37523754 ) ,
37533755 Ok ( ( ) )
@@ -4325,6 +4327,7 @@ mod tests {
43254327 Relocatable :: from( ( 0 , 0 ) ) ,
43264328 ( 0_usize , NonZeroUsize :: new( 1 ) . unwrap( ) )
43274329 ) ] ) ,
4330+ #[ cfg( feature = "test_utils" ) ]
43284331 & HashMap :: new( ) ,
43294332 ) ,
43304333 Ok ( ( ) )
@@ -5348,6 +5351,7 @@ mod tests {
53485351 & mut Vec :: new( ) ,
53495352 #[ cfg( feature = "extensive_hints" ) ]
53505353 & mut HashMap :: new( ) ,
5354+ #[ cfg( feature = "test_utils" ) ]
53515355 & HashMap :: new( )
53525356 ) ,
53535357 Ok ( ( ) )
@@ -5435,6 +5439,7 @@ mod tests {
54355439 & mut Vec :: new( ) ,
54365440 #[ cfg( feature = "extensive_hints" ) ]
54375441 & mut HashMap :: new( ) ,
5442+ #[ cfg( feature = "test_utils" ) ]
54385443 & HashMap :: new( )
54395444 ) ,
54405445 Ok ( ( ) )
0 commit comments