Track reset bank in PohRecorder (#19810)

This commit is contained in:
carllin
2021-09-13 16:55:35 -07:00
committed by GitHub
parent 97fc64dd0c
commit 87a7f00926
8 changed files with 317 additions and 314 deletions

View File

@@ -5401,6 +5401,20 @@ impl Bank {
self.feature_set = Arc::new(feature_set);
}
pub fn fill_bank_with_ticks(&self) {
let parent_distance = if self.slot() == 0 {
1
} else {
self.slot() - self.parent_slot()
};
for _ in 0..parent_distance {
let last_blockhash = self.last_blockhash();
while self.last_blockhash() == last_blockhash {
self.register_tick(&Hash::new_unique())
}
}
}
// This is called from snapshot restore AND for each epoch boundary
// The entire code path herein must be idempotent
fn apply_feature_activations(