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

* 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

(cherry picked from commit 6d5c6c17c5)

# Conflicts:
#	sdk/src/native_loader.rs

* Fix conflicts

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
This commit is contained in:
mergify[bot]
2021-03-25 17:17:43 +09:00
committed by GitHub
parent 5f061dcea1
commit defd9238fa
16 changed files with 206 additions and 104 deletions

View File

@@ -63,6 +63,8 @@ pub type Slot = u64;
pub type Epoch = u64;
pub const GENESIS_EPOCH: Epoch = 0;
// must be sync with Account::rent_epoch::default()
pub const INITIAL_RENT_EPOCH: Epoch = 0;
/// SlotIndex is an index to the slots of a epoch
pub type SlotIndex = u64;