v1.6: Restore ability for programs to upgrade themselves (#20263)

* Make helper associated fn

* Add feature definition

* Restore program-id write lock when upgradeable loader is present; restore bpf upgrade-self test

* Remove spurious comment
This commit is contained in:
Tyera Eulberg
2021-09-27 17:29:59 -05:00
committed by GitHub
parent 1a88a9eb0e
commit 9b6ec0b6d5
12 changed files with 295 additions and 85 deletions

View File

@@ -110,7 +110,9 @@ impl TransactionStatusService {
.expect("FeeCalculator must exist");
let fee = fee_calculator.calculate_fee(transaction.message());
let (writable_keys, readonly_keys) =
transaction.message.get_account_keys_by_lock_type();
transaction.message.get_account_keys_by_lock_type(
bank.restore_write_lock_when_upgradeable(),
);
let inner_instructions = inner_instructions.map(|inner_instructions| {
inner_instructions