-
Notifications
You must be signed in to change notification settings - Fork 10
/
ghostdagmanager.go
36 lines (31 loc) · 1.01 KB
/
ghostdagmanager.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package ghostdagmanager
import (
"github.com/sedracoin/sedrad/domain/consensus/model"
"github.com/sedracoin/sedrad/domain/consensus/model/externalapi"
)
// ghostdagManager resolves and manages GHOSTDAG block data
type ghostdagManager struct {
databaseContext model.DBReader
dagTopologyManager model.DAGTopologyManager
ghostdagDataStore model.GHOSTDAGDataStore
headerStore model.BlockHeaderStore
k externalapi.KType
genesisHash *externalapi.DomainHash
}
// New instantiates a new GHOSTDAGManager
func New(
databaseContext model.DBReader,
dagTopologyManager model.DAGTopologyManager,
ghostdagDataStore model.GHOSTDAGDataStore,
headerStore model.BlockHeaderStore,
k externalapi.KType,
genesisHash *externalapi.DomainHash) model.GHOSTDAGManager {
return &ghostdagManager{
databaseContext: databaseContext,
dagTopologyManager: dagTopologyManager,
ghostdagDataStore: ghostdagDataStore,
headerStore: headerStore,
k: k,
genesisHash: genesisHash,
}
}