Dont skip eager rent collect across gapped epochs (#10206)

* Dont skip eager rent collect across gapped epochs

* Adjust style and comment

* Adjust ascii chart and comment a bit

* Moar assert

* Relax the partition_count assert for completeness

* Tweak comment...

* tweak a bit

* Add gating logic

* Address reviews

* small formatting

* Clarify the code by replacing auto_generated...

* small formatting

* small formatting

* small formatting

* small formatting

* Narrow down conditional compilation scope
This commit is contained in:
Ryo Onodera
2020-06-25 23:11:33 +09:00
committed by GitHub
parent 84954ad0a0
commit 50f7ed80c8
2 changed files with 300 additions and 53 deletions

View File

@@ -12,10 +12,11 @@ pub type Ancestors = HashMap<Slot, usize>;
pub type RefCount = u64;
type AccountMapEntry<T> = (AtomicU64, RwLock<SlotList<T>>);
pub type AccountMap<K, V> = BTreeMap<K, V>;
#[derive(Debug, Default)]
pub struct AccountsIndex<T> {
pub account_maps: BTreeMap<Pubkey, AccountMapEntry<T>>,
pub account_maps: AccountMap<Pubkey, AccountMapEntry<T>>,
pub roots: HashSet<Slot>,
pub uncleaned_roots: HashSet<Slot>,