mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-24 15:56:42 +00:00

* [NOD-1461] Change the external api interface to not having anything besides DomainTransactions and DomainBlocks. * [NOD-1462] Move external api types to a separate package. * [NOD-1462] Clarify which model we're using in miningmanager. * [NOD-1462] Extract coinbase data to its own struct. * [NOD-1462] Add a comment above CoinbaseData. * [NOD-1462] Fix the comment above CoinbaseData.
38 lines
1.2 KiB
Go
38 lines
1.2 KiB
Go
package dagtraversalmanager
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model"
|
|
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// dagTraversalManager exposes methods for travering blocks
|
|
// in the DAG
|
|
type dagTraversalManager struct {
|
|
dagTopologyManager model.DAGTopologyManager
|
|
ghostdagManager model.GHOSTDAGManager
|
|
}
|
|
|
|
// New instantiates a new DAGTraversalManager
|
|
func New(
|
|
dagTopologyManager model.DAGTopologyManager,
|
|
ghostdagManager model.GHOSTDAGManager) model.DAGTraversalManager {
|
|
return &dagTraversalManager{
|
|
dagTopologyManager: dagTopologyManager,
|
|
ghostdagManager: ghostdagManager,
|
|
}
|
|
}
|
|
|
|
// SelectedParentIterator creates an iterator over the selected
|
|
// parent chain of the given highHash
|
|
func (dtm *dagTraversalManager) SelectedParentIterator(highHash *externalapi.DomainHash) (model.SelectedParentIterator, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// HighestChainBlockBelowBlueScore returns the hash of the
|
|
// highest block with a blue score lower than the given
|
|
// blueScore in the block with the given highHash's selected
|
|
// parent chain
|
|
func (dtm *dagTraversalManager) HighestChainBlockBelowBlueScore(highHash *externalapi.DomainHash, blueScore uint64) (*externalapi.DomainHash, error) {
|
|
return nil, nil
|
|
}
|