Allow closing upgradeable program accounts (backport #19319) (#19411)

* Allow closing upgradeable program accounts (#19319)

(cherry picked from commit a89f180145)

# Conflicts:
#	programs/bpf_loader/src/lib.rs
#	programs/bpf_loader/src/syscalls.rs
#	sdk/src/feature_set.rs

* resolve conflicts

Co-authored-by: Jack May <jack@solana.com>
Co-authored-by: Justin Starry <justin@solana.com>
This commit is contained in:
mergify[bot]
2021-08-27 08:56:51 +00:00
committed by GitHub
parent 52dfb4a09c
commit 58bef3a94b
9 changed files with 476 additions and 137 deletions

View File

@@ -112,8 +112,12 @@ pub enum UpgradeableLoaderInstruction {
/// withdraws all the lamports
///
/// # Account references
/// 0. `[writable]` The account to close.
/// 0. `[writable]` The account to close, if closing a program must be the
/// ProgramData account.
/// 1. `[writable]` The account to deposit the closed account's lamports.
/// 2. `[signer]` The account's authority.
/// 2. `[signer]` The account's authority, Optional, required for
/// initialized accounts.
/// 3. `[writable]` The associated Program account if the account to close
/// is a ProgramData account.
Close,
}