Cleanup: InvokeContext accessors (#21574)

* Removes blockhash accessors from InvokeContext.

* Removes lamports_per_signature accessors from InvokeContext.

* Removes return_data accessors from InvokeContext.

* Removes feature_set accessor from InvokeContext.

* Removes instruction_recorders and instruction_index accessors from InvokeContext.

* Moves get_sysvars() into InvokeContext.

* Removes compute_meter parameter from InvokeContext::new().

* Removes InvokeContext::new_mock_with_sysvars_and_features().

* Removes InvokeContext::update_timing().
This commit is contained in:
Alexander Meißner
2021-12-03 12:15:22 +01:00
committed by GitHub
parent dab0e8fdc7
commit a9d5ef2055
14 changed files with 314 additions and 343 deletions

View File

@@ -100,7 +100,10 @@ pub fn process_instruction(
}
}
if invoke_context.is_feature_active(&feature_set::dedupe_config_program_signers::id()) {
if invoke_context
.feature_set
.is_active(&feature_set::dedupe_config_program_signers::id())
{
let total_new_keys = key_list.keys.len();
let unique_new_keys = key_list.keys.into_iter().collect::<BTreeSet<_>>();
if unique_new_keys.len() != total_new_keys {