claim: don't re-calculate activeAt for those already active

This commit is contained in:
Tzu-Jung Lee 2018-08-14 19:37:59 -07:00
parent feebb96caa
commit 385b5df6c8

View file

@ -226,7 +226,13 @@ func updateEffectiveAmounts(ht Height, claims, supports List) {
func updateActiveHeights(n *Node, lists ...List) {
for _, l := range lists {
for _, v := range l {
if v.ActiveAt < n.height {
continue
}
v.ActiveAt = v.Accepted + calDelay(n.height, n.tookover)
if v.ActiveAt < n.height {
v.ActiveAt = n.height
}
}
}
}