Fix IsAncestorOf
This commit is contained in:
parent
8807c75c51
commit
183df4c135
@ -471,7 +471,7 @@ func (cs *ChainStore) IsAncestorOf(a, b *types.TipSet) (bool, error) {
|
|||||||
|
|
||||||
cur := b
|
cur := b
|
||||||
for !a.Equals(cur) && cur.Height() > a.Height() {
|
for !a.Equals(cur) && cur.Height() > a.Height() {
|
||||||
next, err := cs.LoadTipSet(b.Parents())
|
next, err := cs.LoadTipSet(cur.Parents())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user