diff --git a/programs/bpf_loader/src/lib.rs b/programs/bpf_loader/src/lib.rs index d2d227289c..56ccbcd07d 100644 --- a/programs/bpf_loader/src/lib.rs +++ b/programs/bpf_loader/src/lib.rs @@ -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); },