From 22ca850ce74ebe96e4fbd4ca50b974a219e014ae Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 16 Mar 2021 00:19:50 -0700 Subject: [PATCH] Add AccountSharedData stub for forwards compatibility with the v1.6 release line --- sdk/src/account.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/src/account.rs b/sdk/src/account.rs index 27400b6d36..a57010550b 100644 --- a/sdk/src/account.rs +++ b/sdk/src/account.rs @@ -111,6 +111,14 @@ impl Account { } } +// AccountSharedData stub for forwards compatibility with the v1.6 release line +pub struct AccountSharedData {} +impl AccountSharedData { + pub fn new_ref(lamports: u64, space: usize, owner: &Pubkey) -> Rc> { + Rc::new(RefCell::new(Account::new(lamports, space, owner))) + } +} + /// Create an `Account` from a `Sysvar`. pub fn create_account(sysvar: &S, lamports: u64) -> Account { let data_len = S::size_of().max(bincode::serialized_size(sysvar).unwrap() as usize);