claimnode: Support to BestClaim becomes Active immediately.

This commit is contained in:
Tzu-Jung Lee 2018-07-11 11:51:20 -07:00
parent 212fd1983a
commit 5e642e642f

View file

@ -122,7 +122,7 @@ func (n *Node) AddSupport(op wire.OutPoint, amt claim.Amount, supported claim.ID
ActiveAt: n.height + 1,
Seq: n.seq,
}
if n.BestClaim() == nil || n.BestClaim().OutPoint != op {
if n.BestClaim() == nil || n.BestClaim().ID != supported {
s.ActiveAt = calActiveHeight(s.Accepted, s.Accepted, n.Tookover())
}