mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-13 13:00:10 +00:00

* Save DAA score and DAA added blocks for each block * Add test * Add pruning support * Replace 8 with uint64Length * Separate DAABlocksStore cache size to DAA score and daaAddedBlocks
22 lines
1.2 KiB
Go
22 lines
1.2 KiB
Go
package consensus
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model"
|
|
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
"math/big"
|
|
"time"
|
|
)
|
|
|
|
// GHOSTDAGManagerConstructor is the function signature for a constructor of a type implementing model.GHOSTDAGManager
|
|
type GHOSTDAGManagerConstructor func(model.DBReader, model.DAGTopologyManager,
|
|
model.GHOSTDAGDataStore, model.BlockHeaderStore, model.KType) model.GHOSTDAGManager
|
|
|
|
// DifficultyManagerConstructor is the function signature for a constructor of a type implementing model.DifficultyManager
|
|
type DifficultyManagerConstructor func(model.DBReader, model.GHOSTDAGManager, model.GHOSTDAGDataStore,
|
|
model.BlockHeaderStore, model.DAABlocksStore, model.DAGTopologyManager, model.DAGTraversalManager, *big.Int, int, bool, time.Duration,
|
|
*externalapi.DomainHash) model.DifficultyManager
|
|
|
|
// PastMedianTimeManagerConstructor is the function signature for a constructor of a type implementing model.PastMedianTimeManager
|
|
type PastMedianTimeManagerConstructor func(int, model.DBReader, model.DAGTraversalManager, model.BlockHeaderStore,
|
|
model.GHOSTDAGDataStore, *externalapi.DomainHash) model.PastMedianTimeManager
|