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

* [NOD-1476] Add dependency to BlockRelationStore in BlockProcessor. * [NOD-1476] Add dependency to BlockStatusStore in BlockValidator. * [NOD-1476] Add dependency to GHOSTDAGManager in BlockValidator. * [NOD-1476] Rename CalculateConsensusStateChanges to AddBlockToVirtual. * [NOD-1476] Remove RestoreDiffFromVirtual. * [NOD-1476] Remove RestorePastUTXOSet. * [NOD-1476] Add dependency to GHOSTDAGDataStore in ConsensusStateManager. * [NOD-1476] Rename CalculateAcceptanceDataAndUTXOMultiset to just CalculateAcceptanceData. * [NOD-1476] Remove UTXODiffManager and add dependencies to AcceptanceManager. * [NOD-1476] Rename CalculateAcceptanceData to CalculateAcceptanceDataAndMultiset. * [NOD-1476] Add dependency to DAGTopologyManager from ConsensusStateManager. * [NOD-1476] Add dependency to BlockStore from ConsensusStateManager. * [NOD-1476] Add dependency to PruningManager from ConsensusStateManager. * [NOD-1476] Remove unnecessary stuff from ConsensusStateChanges. * [NOD-1476] Add dependency to UTXODiffStore from ConsensusStateManager. * [NOD-1476] Add tips to BlockRelationsStore. * [NOD-1476] Add dependency to BlockRelationsStore from ConsensusStateManager. * [NOD-1476] Remove Tips() from ConsensusStateStore. * [NOD-1476] Remove acceptanceManager. * [NOD-1476] Remove irrelevant functions out of ConsensusStateManager.
52 lines
1.5 KiB
Go
52 lines
1.5 KiB
Go
package pruningmanager
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model"
|
|
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// pruningManager resolves and manages the current pruning point
|
|
type pruningManager struct {
|
|
dagTraversalManager model.DAGTraversalManager
|
|
dagTopologyManager model.DAGTopologyManager
|
|
|
|
pruningStore model.PruningStore
|
|
blockStatusStore model.BlockStatusStore
|
|
consensusStateStore model.ConsensusStateStore
|
|
}
|
|
|
|
// New instantiates a new PruningManager
|
|
func New(
|
|
dagTraversalManager model.DAGTraversalManager,
|
|
dagTopologyManager model.DAGTopologyManager,
|
|
pruningStore model.PruningStore,
|
|
blockStatusStore model.BlockStatusStore,
|
|
consensusStateStore model.ConsensusStateStore) model.PruningManager {
|
|
|
|
return &pruningManager{
|
|
dagTraversalManager: dagTraversalManager,
|
|
dagTopologyManager: dagTopologyManager,
|
|
|
|
pruningStore: pruningStore,
|
|
blockStatusStore: blockStatusStore,
|
|
consensusStateStore: consensusStateStore,
|
|
}
|
|
}
|
|
|
|
// FindNextPruningPoint finds the next pruning point from the
|
|
// given blockHash
|
|
func (pm *pruningManager) FindNextPruningPoint(blockHash *externalapi.DomainHash) error {
|
|
return nil
|
|
}
|
|
|
|
// PruningPoint returns the hash of the current pruning point
|
|
func (pm *pruningManager) PruningPoint() (*externalapi.DomainHash, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
// SerializedUTXOSet returns the serialized UTXO set of the
|
|
// current pruning point
|
|
func (pm *pruningManager) SerializedUTXOSet() ([]byte, error) {
|
|
return nil, nil
|
|
}
|