File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 36
36
entrypoint:: { MAX_PERMITTED_DATA_INCREASE , SUCCESS } ,
37
37
feature_set:: {
38
38
bpf_account_data_direct_mapping, enable_bpf_loader_set_authority_checked_ix,
39
+ enable_loader_v4,
39
40
} ,
40
41
instruction:: { AccountMeta , InstructionError } ,
41
42
loader_upgradeable_instruction:: UpgradeableLoaderInstruction ,
@@ -525,6 +526,14 @@ fn process_loader_upgradeable_instruction(
525
526
) ?;
526
527
}
527
528
UpgradeableLoaderInstruction :: DeployWithMaxDataLen { max_data_len } => {
529
+ if invoke_context
530
+ . get_feature_set ( )
531
+ . is_active ( & enable_loader_v4:: id ( ) )
532
+ {
533
+ ic_logger_msg ! ( log_collector, "Unsupported instruction" ) ;
534
+ return Err ( InstructionError :: InvalidInstructionData ) ;
535
+ }
536
+
528
537
instruction_context. check_number_of_instruction_accounts ( 4 ) ?;
529
538
let payer_key = * transaction_context. get_key_of_account_at_index (
530
539
instruction_context. get_index_of_instruction_account_in_transaction ( 0 ) ?,
@@ -1614,6 +1623,9 @@ mod tests {
1614
1623
expected_result,
1615
1624
Entrypoint :: vm,
1616
1625
|invoke_context| {
1626
+ let mut feature_set = invoke_context. get_feature_set ( ) . clone ( ) ;
1627
+ feature_set. deactivate ( & enable_loader_v4:: id ( ) ) ;
1628
+ invoke_context. mock_set_feature_set ( Arc :: new ( feature_set) ) ;
1617
1629
test_utils:: load_all_invoked_programs ( invoke_context) ;
1618
1630
} ,
1619
1631
|_invoke_context| { } ,
You can’t perform that action at this time.
0 commit comments