Fix deployment slot for upgraded programs (#30902)
This commit is contained in:
parent
0df28f6d51
commit
cbf70430a5
|
@ -936,7 +936,7 @@ fn process_loader_upgradeable_instruction(
|
|||
);
|
||||
return Err(InstructionError::InsufficientFunds);
|
||||
}
|
||||
let deployment_slot = if let UpgradeableLoaderState::ProgramData {
|
||||
if let UpgradeableLoaderState::ProgramData {
|
||||
slot,
|
||||
upgrade_authority_address,
|
||||
} = programdata.get_state()?
|
||||
|
@ -961,7 +961,6 @@ fn process_loader_upgradeable_instruction(
|
|||
ic_logger_msg!(log_collector, "Upgrade authority did not sign");
|
||||
return Err(InstructionError::MissingRequiredSignature);
|
||||
}
|
||||
slot
|
||||
} else {
|
||||
ic_logger_msg!(log_collector, "Invalid ProgramData account");
|
||||
return Err(InstructionError::InvalidAccountData);
|
||||
|
@ -978,7 +977,7 @@ fn process_loader_upgradeable_instruction(
|
|||
new_program_id,
|
||||
program_id,
|
||||
UpgradeableLoaderState::size_of_program().saturating_add(programdata_len),
|
||||
deployment_slot,
|
||||
clock.slot,
|
||||
{
|
||||
drop(buffer);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue