Check for frozen in confirm_forks (#3678)
This commit is contained in:
@ -418,7 +418,7 @@ impl ReplayStage {
|
|||||||
.filter(|(b, stake_lockouts)| {
|
.filter(|(b, stake_lockouts)| {
|
||||||
let vote_threshold =
|
let vote_threshold =
|
||||||
locktower.check_vote_stake_threshold(b.slot(), &stake_lockouts);
|
locktower.check_vote_stake_threshold(b.slot(), &stake_lockouts);
|
||||||
Self::confirm_forks(locktower, stake_lockouts, progress);
|
Self::confirm_forks(locktower, stake_lockouts, progress, bank_forks);
|
||||||
debug!("bank vote_threshold: {} {}", b.slot(), vote_threshold);
|
debug!("bank vote_threshold: {} {}", b.slot(), vote_threshold);
|
||||||
vote_threshold
|
vote_threshold
|
||||||
})
|
})
|
||||||
@ -448,10 +448,18 @@ impl ReplayStage {
|
|||||||
locktower: &Locktower,
|
locktower: &Locktower,
|
||||||
stake_lockouts: &HashMap<u64, StakeLockout>,
|
stake_lockouts: &HashMap<u64, StakeLockout>,
|
||||||
progress: &mut HashMap<u64, ForkProgress>,
|
progress: &mut HashMap<u64, ForkProgress>,
|
||||||
|
bank_forks: &Arc<RwLock<BankForks>>,
|
||||||
) {
|
) {
|
||||||
progress.retain(|slot, prog| {
|
progress.retain(|slot, prog| {
|
||||||
let duration = timing::timestamp() - prog.started_ms;
|
let duration = timing::timestamp() - prog.started_ms;
|
||||||
if locktower.is_slot_confirmed(*slot, stake_lockouts) {
|
if locktower.is_slot_confirmed(*slot, stake_lockouts)
|
||||||
|
&& bank_forks
|
||||||
|
.read()
|
||||||
|
.unwrap()
|
||||||
|
.get(*slot)
|
||||||
|
.map(|s| s.is_frozen())
|
||||||
|
.unwrap_or(true)
|
||||||
|
{
|
||||||
info!("validator fork confirmed {} {}", *slot, duration);
|
info!("validator fork confirmed {} {}", *slot, duration);
|
||||||
solana_metrics::submit(
|
solana_metrics::submit(
|
||||||
influxdb::Point::new(&"validator-confirmation")
|
influxdb::Point::new(&"validator-confirmation")
|
||||||
|
Reference in New Issue
Block a user