This repository was archived by the owner on Jan 22, 2025. It is now read-only.
File tree 2 files changed +10
-11
lines changed
2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -498,12 +498,10 @@ fn process_instruction_inner(
498
498
let mut get_or_create_executor_time = Measure :: start ( "get_or_create_executor_time" ) ;
499
499
let executor = invoke_context
500
500
. find_program_in_cache ( program_account. get_key ( ) )
501
- . ok_or ( InstructionError :: InvalidAccountData ) ?;
502
-
503
- if executor. is_tombstone ( ) {
504
- return Err ( Box :: new ( InstructionError :: InvalidAccountData ) ) ;
505
- }
506
-
501
+ . ok_or_else ( || {
502
+ ic_logger_msg ! ( log_collector, "Program is not cached" ) ;
503
+ InstructionError :: InvalidAccountData
504
+ } ) ?;
507
505
drop ( program_account) ;
508
506
get_or_create_executor_time. stop ( ) ;
509
507
saturating_add_assign ! (
@@ -516,6 +514,7 @@ fn process_instruction_inner(
516
514
LoadedProgramType :: FailedVerification ( _)
517
515
| LoadedProgramType :: Closed
518
516
| LoadedProgramType :: DelayVisibility => {
517
+ ic_logger_msg ! ( log_collector, "Program is not deployed" ) ;
519
518
Err ( Box :: new ( InstructionError :: InvalidAccountData ) as Box < dyn std:: error:: Error > )
520
519
}
521
520
LoadedProgramType :: LegacyV0 ( executable) => execute ( executable, invoke_context) ,
Original file line number Diff line number Diff line change @@ -595,11 +595,10 @@ pub fn process_instruction_inner(
595
595
let mut get_or_create_executor_time = Measure :: start ( "get_or_create_executor_time" ) ;
596
596
let loaded_program = invoke_context
597
597
. find_program_in_cache ( program. get_key ( ) )
598
- . ok_or ( InstructionError :: InvalidAccountData ) ?;
599
-
600
- if loaded_program. is_tombstone ( ) {
601
- return Err ( Box :: new ( InstructionError :: InvalidAccountData ) ) ;
602
- }
598
+ . ok_or_else ( || {
599
+ ic_logger_msg ! ( log_collector, "Program is not cached" ) ;
600
+ InstructionError :: InvalidAccountData
601
+ } ) ?;
603
602
get_or_create_executor_time. stop ( ) ;
604
603
saturating_add_assign ! (
605
604
invoke_context. timings. get_or_create_executor_us,
@@ -613,6 +612,7 @@ pub fn process_instruction_inner(
613
612
LoadedProgramType :: FailedVerification ( _)
614
613
| LoadedProgramType :: Closed
615
614
| LoadedProgramType :: DelayVisibility => {
615
+ ic_logger_msg ! ( log_collector, "Program is not deployed" ) ;
616
616
Err ( Box :: new ( InstructionError :: InvalidAccountData ) as Box < dyn std:: error:: Error > )
617
617
}
618
618
LoadedProgramType :: Typed ( executable) => execute ( invoke_context, executable) ,
You can’t perform that action at this time.
0 commit comments