cleanup old features (#19956)
This commit is contained in:
@ -116,7 +116,6 @@ impl PreAccount {
|
||||
post: &AccountSharedData,
|
||||
timings: &mut ExecuteDetailsTimings,
|
||||
outermost_call: bool,
|
||||
updated_verify_policy: bool,
|
||||
) -> Result<(), InstructionError> {
|
||||
let pre = self.account.borrow();
|
||||
|
||||
@ -185,14 +184,9 @@ impl PreAccount {
|
||||
if !rent.is_exempt(post.lamports(), post.data().len()) {
|
||||
return Err(InstructionError::ExecutableAccountNotRentExempt);
|
||||
}
|
||||
let owner = if updated_verify_policy {
|
||||
post.owner()
|
||||
} else {
|
||||
pre.owner()
|
||||
};
|
||||
if !is_writable // line coverage used to get branch coverage
|
||||
|| pre.executable()
|
||||
|| program_id != owner
|
||||
|| program_id != post.owner()
|
||||
{
|
||||
return Err(InstructionError::ExecutableModified);
|
||||
}
|
||||
@ -703,7 +697,6 @@ impl InstructionProcessor {
|
||||
write_privileges: &[bool],
|
||||
timings: &mut ExecuteDetailsTimings,
|
||||
logger: Rc<RefCell<dyn Logger>>,
|
||||
updated_verify_policy: bool,
|
||||
) -> Result<(), InstructionError> {
|
||||
// Verify the per-account instruction results
|
||||
let (mut pre_sum, mut post_sum) = (0_u128, 0_u128);
|
||||
@ -722,15 +715,7 @@ impl InstructionProcessor {
|
||||
}
|
||||
let account = account.borrow();
|
||||
pre_account
|
||||
.verify(
|
||||
program_id,
|
||||
is_writable,
|
||||
rent,
|
||||
&account,
|
||||
timings,
|
||||
false,
|
||||
updated_verify_policy,
|
||||
)
|
||||
.verify(program_id, is_writable, rent, &account, timings, false)
|
||||
.map_err(|err| {
|
||||
ic_logger_msg!(logger, "failed to verify account {}: {}", key, err);
|
||||
err
|
||||
@ -848,7 +833,6 @@ mod tests {
|
||||
&self.post,
|
||||
&mut ExecuteDetailsTimings::default(),
|
||||
false,
|
||||
true,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user