* chore: cargo +nightly clippy --fix -Z unstable-options (cherry picked from commit6514096a67
) # Conflicts: # core/src/banking_stage.rs # core/src/cost_model.rs # core/src/cost_tracker.rs # core/src/execute_cost_table.rs # core/src/replay_stage.rs # core/src/tvu.rs # ledger-tool/src/main.rs # programs/bpf_loader/build.rs # rbpf-cli/src/main.rs # sdk/cargo-build-bpf/src/main.rs # sdk/cargo-test-bpf/src/main.rs # sdk/src/secp256k1_instruction.rs * chore: cargo fmt (cherry picked from commit789f33e8db
) * Updates BPF program assert_instruction_count tests. (cherry picked from commitc1e03f3410
) # Conflicts: # programs/bpf/tests/programs.rs * Resolve conflicts Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net> Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
@@ -115,7 +115,7 @@ impl PreAccount {
|
||||
&& (!is_writable // line coverage used to get branch coverage
|
||||
|| pre.executable()
|
||||
|| program_id != pre.owner()
|
||||
|| !Self::is_zeroed(&post.data()))
|
||||
|| !Self::is_zeroed(post.data()))
|
||||
{
|
||||
return Err(InstructionError::ModifiedProgramId);
|
||||
}
|
||||
@@ -447,7 +447,7 @@ impl<'a> InvokeContext for ThisInvokeContext<'a> {
|
||||
self.executors.borrow_mut().insert(*pubkey, executor);
|
||||
}
|
||||
fn get_executor(&self, pubkey: &Pubkey) -> Option<Arc<dyn Executor>> {
|
||||
self.executors.borrow().get(&pubkey)
|
||||
self.executors.borrow().get(pubkey)
|
||||
}
|
||||
fn record_instruction(&self, instruction: &Instruction) {
|
||||
if let Some(recorder) = &self.instruction_recorder {
|
||||
@@ -650,7 +650,7 @@ impl MessageProcessor {
|
||||
if id == root_id {
|
||||
invoke_context.remove_first_keyed_account()?;
|
||||
// Call the builtin program
|
||||
return process_instruction(&program_id, instruction_data, invoke_context);
|
||||
return process_instruction(program_id, instruction_data, invoke_context);
|
||||
}
|
||||
}
|
||||
// Call the program via the native loader
|
||||
@@ -664,7 +664,7 @@ impl MessageProcessor {
|
||||
for (id, process_instruction) in &self.programs {
|
||||
if id == owner_id {
|
||||
// Call the program via a builtin loader
|
||||
return process_instruction(&program_id, instruction_data, invoke_context);
|
||||
return process_instruction(program_id, instruction_data, invoke_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -775,7 +775,7 @@ impl MessageProcessor {
|
||||
.map(|index| keyed_account_at_index(keyed_accounts, *index))
|
||||
.collect::<Result<Vec<&KeyedAccount>, InstructionError>>()?;
|
||||
let (message, callee_program_id, _) =
|
||||
Self::create_message(&instruction, &keyed_accounts, &signers, &invoke_context)?;
|
||||
Self::create_message(&instruction, &keyed_accounts, signers, &invoke_context)?;
|
||||
let keyed_accounts = invoke_context.get_keyed_accounts()?;
|
||||
let mut caller_write_privileges = keyed_account_indices
|
||||
.iter()
|
||||
@@ -1029,7 +1029,7 @@ impl MessageProcessor {
|
||||
let account = accounts[account_index].borrow();
|
||||
pre_accounts[unique_index]
|
||||
.verify(
|
||||
&program_id,
|
||||
program_id,
|
||||
message.is_writable(account_index, demote_sysvar_write_locks),
|
||||
rent,
|
||||
&account,
|
||||
@@ -1095,7 +1095,7 @@ impl MessageProcessor {
|
||||
}
|
||||
let account = account.borrow();
|
||||
pre_account
|
||||
.verify(&program_id, is_writable, &rent, &account, timings, false)
|
||||
.verify(program_id, is_writable, rent, &account, timings, false)
|
||||
.map_err(|err| {
|
||||
ic_logger_msg!(logger, "failed to verify account {}: {}", key, err);
|
||||
err
|
||||
|
Reference in New Issue
Block a user