Add CPI support for upgradeable loader (bp #14193) (#14335)

* Add CPI support for upgradeable loader (#14193)


(cherry picked from commit e8cc0bef6c)

* update crate version

* nudge

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2020-12-29 23:05:40 +00:00
committed by GitHub
parent ebfbe5ed8a
commit 403220a559
10 changed files with 203 additions and 19 deletions

View File

@@ -61,6 +61,8 @@ pub trait InvokeContext {
fn record_instruction(&self, instruction: &Instruction);
/// Get the bank's active feature set
fn is_feature_active(&self, feature_id: &Pubkey) -> bool;
/// Get an account from a pre-account
fn get_account(&self, pubkey: &Pubkey) -> Option<Account>;
}
#[derive(Clone, Copy, Debug, AbiExample)]
@@ -339,4 +341,7 @@ impl InvokeContext for MockInvokeContext {
fn is_feature_active(&self, _feature_id: &Pubkey) -> bool {
true
}
fn get_account(&self, _pubkey: &Pubkey) -> Option<Account> {
None
}
}