Fix argument order for IsAncestorOf in boundedMergeBreakingParents (#1966)

This commit is contained in:
Ori Newman 2022-03-09 21:11:00 +02:00 committed by GitHub
parent 190e725dd0
commit 061e65be93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -336,12 +336,12 @@ func (csm *consensusStateManager) boundedMergeBreakingParents(stagingArea *model
log.Debugf("Checking whether parent %s breaks the bounded merge set", parent)
isBadRedInPast := false
for _, badRedBlock := range badReds {
isBadRedInPast, err = csm.dagTopologyManager.IsAncestorOf(stagingArea, parent, badRedBlock)
isBadRedInPast, err = csm.dagTopologyManager.IsAncestorOf(stagingArea, badRedBlock, parent)
if err != nil {
return nil, err
}
if isBadRedInPast {
log.Debugf("Parent %s is an ancestor of bad red %s", parent, badRedBlock)
log.Debugf("Parent %s is a descendant of bad red %s", parent, badRedBlock)
break
}
}