Simplify account.rent_epoch handling for sysvar rent (#16049)

* Add some code for special local testing

* Add comment to store_account_and_update_capitalization

* Simplify account.rent_epoch handling for sysvar rent

* Introduce *_for_test functions

* Add deprecation messages to existing api
This commit is contained in:
Ryo Onodera
2021-03-25 15:23:20 +09:00
committed by GitHub
parent 7f0ac6a67c
commit 6d5c6c17c5
16 changed files with 206 additions and 104 deletions

View File

@@ -1124,7 +1124,7 @@ mod tests {
account::Account,
instruction::{AccountMeta, Instruction, InstructionError},
message::Message,
native_loader::create_loadable_account,
native_loader::create_loadable_account_for_test,
};
#[test]
@@ -1706,9 +1706,8 @@ mod tests {
accounts.push(account);
let mut loaders: Vec<Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>> = Vec::new();
let account = Rc::new(RefCell::new(create_loadable_account(
let account = Rc::new(RefCell::new(create_loadable_account_for_test(
"mock_system_program",
1,
)));
loaders.push(vec![(mock_system_program_id, account)]);
@@ -1876,9 +1875,8 @@ mod tests {
accounts.push(account);
let mut loaders: Vec<Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>> = Vec::new();
let account = Rc::new(RefCell::new(create_loadable_account(
let account = Rc::new(RefCell::new(create_loadable_account_for_test(
"mock_system_program",
1,
)));
loaders.push(vec![(mock_program_id, account)]);