Skip to content

Commit

Permalink
miner
Browse files Browse the repository at this point in the history
  • Loading branch information
elvis88 committed Jul 16, 2019
1 parent 27f1cf5 commit e971816
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions consensus/dpos/dpos.go
Original file line number Diff line number Diff line change
Expand Up @@ -1312,17 +1312,9 @@ func (dpos *Dpos) IsValidateCandidate2(chain consensus.IChainReader, parent *typ
return "", err
}

systemio := strings.HasPrefix(candidate, dpos.config.SystemName) || strings.Contains(candidate, fmt.Sprintf("%s,", dpos.config.SystemName))
if gstate.TakeOver {
if force && systemio {
return dpos.config.SystemName, nil
}
return "", ErrSystemTakeOver
} else if parent.Number.Uint64() > 0 && (dpos.CalcProposedIrreversible(chain, parent, true) == 0 || timestamp-parent.Time.Uint64() > 2*dpos.config.mepochInterval()) {
if force && systemio {
// first take over
return dpos.config.SystemName, nil
}
if parent.Number.Uint64() >= dpos.config.CandidateScheduleSize*dpos.config.BlockFrequency {
return "", ErrTooMuchRreversible
}
Expand Down

0 comments on commit e971816

Please sign in to comment.