mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
Fix deletePastBlocks (#1280)
This commit is contained in:
parent
b749b2db0b
commit
a0b93e1230
@ -198,7 +198,14 @@ func (pm *pruningManager) deletePastBlocks(pruningPoint *externalapi.DomainHash)
|
||||
return err
|
||||
}
|
||||
if !hasPruningPointInPast {
|
||||
isInVirtualPast, err := pm.dagTopologyManager.IsAncestorOf(model.VirtualBlockHash, tip)
|
||||
virtualParents, err := pm.dagTopologyManager.Parents(model.VirtualBlockHash)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Because virtual doesn't have reachability data, we need to check reachability
|
||||
// using it parents.
|
||||
isInVirtualPast, err := pm.dagTopologyManager.IsAncestorOfAny(tip, virtualParents)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user