Skip to content

Commit def7552

Browse files
committed
Adjust feature gate for deployment (#6)
1 parent 65d3f50 commit def7552

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

program-runtime/src/vm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ pub fn execute<'a, 'b: 'a>(
229229
let direct_account_pointers_in_program_input = invoke_context
230230
.get_feature_set()
231231
.direct_account_pointers_in_program_input;
232-
let is_abi_v2 = executable.get_sbpf_version() == SBPFVersion::V4;
232+
let is_abi_v2 = executable.get_sbpf_version() == SBPFVersion::V4
233+
&& invoke_context.get_feature_set().program_runtime_abiv2;
233234

234235
let mut abiv1_parameters = if is_abi_v2 {
235236
initialize_abi_v2_areas(invoke_context, executable)?;

syscalls/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,11 @@ pub fn create_program_runtime_environment(
338338
} else {
339339
SBPFVersion::V3
340340
};
341-
let max_sbpf_version = if feature_set.enable_sbpf_v3_deployment_and_execution {
341+
342+
let max_sbpf_version = if feature_set.program_runtime_abiv2 {
342343
SBPFVersion::V4
344+
} else if feature_set.enable_sbpf_v3_deployment_and_execution {
345+
SBPFVersion::V3
343346
} else if feature_set.enable_sbpf_v2_deployment_and_execution {
344347
SBPFVersion::V2
345348
} else if feature_set.enable_sbpf_v1_deployment_and_execution {

0 commit comments

Comments
 (0)