mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-29 16:38:39 +00:00
14 lines
665 B
Go
14 lines
665 B
Go
package model
|
|
|
|
import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
|
|
// ReachabilityManager maintains a structure that allows to answer
|
|
// reachability queries in sub-linear time
|
|
type ReachabilityManager interface {
|
|
AddBlock(blockHash *externalapi.DomainHash) error
|
|
IsReachabilityTreeAncestorOf(blockHashA *externalapi.DomainHash, blockHashB *externalapi.DomainHash) (bool, error)
|
|
IsDAGAncestorOf(blockHashA *externalapi.DomainHash, blockHashB *externalapi.DomainHash) (bool, error)
|
|
UpdateReindexRoot(selectedTip *externalapi.DomainHash) error
|
|
FindNextAncestor(descendant, ancestor *externalapi.DomainHash) (*externalapi.DomainHash, error)
|
|
}
|