mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[NOD-1466] Move UTXODiffStore from ConsensusStateManager to UTXODiffManager (#961)
This commit is contained in:
parent
8c63835971
commit
4c1f24da82
@ -69,14 +69,13 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, databaseContext *dba
|
||||
dagTraversalManager := dagtraversalmanager.New(
|
||||
dagTopologyManager,
|
||||
ghostdagManager)
|
||||
utxoDiffManager := utxodiffmanager.New()
|
||||
utxoDiffManager := utxodiffmanager.New(utxoDiffStore)
|
||||
acceptanceManager := acceptancemanager.New(utxoDiffManager)
|
||||
consensusStateManager := consensusstatemanager.New(
|
||||
domainDBContext,
|
||||
dagParams,
|
||||
consensusStateStore,
|
||||
multisetStore,
|
||||
utxoDiffStore,
|
||||
blockStore,
|
||||
ghostdagManager,
|
||||
acceptanceManager)
|
||||
|
@ -14,7 +14,6 @@ type consensusStateManager struct {
|
||||
databaseContext *database.DomainDBContext
|
||||
consensusStateStore model.ConsensusStateStore
|
||||
multisetStore model.MultisetStore
|
||||
utxoDiffStore model.UTXODiffStore
|
||||
blockStore model.BlockStore
|
||||
ghostdagManager model.GHOSTDAGManager
|
||||
acceptanceManager model.AcceptanceManager
|
||||
@ -26,7 +25,6 @@ func New(
|
||||
dagParams *dagconfig.Params,
|
||||
consensusStateStore model.ConsensusStateStore,
|
||||
multisetStore model.MultisetStore,
|
||||
utxoDiffStore model.UTXODiffStore,
|
||||
blockStore model.BlockStore,
|
||||
ghostdagManager model.GHOSTDAGManager,
|
||||
acceptanceManager model.AcceptanceManager) model.ConsensusStateManager {
|
||||
@ -37,7 +35,6 @@ func New(
|
||||
databaseContext: databaseContext,
|
||||
consensusStateStore: consensusStateStore,
|
||||
multisetStore: multisetStore,
|
||||
utxoDiffStore: utxoDiffStore,
|
||||
blockStore: blockStore,
|
||||
ghostdagManager: ghostdagManager,
|
||||
acceptanceManager: acceptanceManager,
|
||||
|
@ -8,11 +8,14 @@ import (
|
||||
// UTXODiffManager provides methods to access
|
||||
// and store UTXO diffs
|
||||
type utxoDiffManager struct {
|
||||
utxoDiffStore model.UTXODiffStore
|
||||
}
|
||||
|
||||
// New instantiates a new UTXODiffManager
|
||||
func New() model.UTXODiffManager {
|
||||
return &utxoDiffManager{}
|
||||
func New(utxoDiffStore model.UTXODiffStore) model.UTXODiffManager {
|
||||
return &utxoDiffManager{
|
||||
utxoDiffStore: utxoDiffStore,
|
||||
}
|
||||
}
|
||||
|
||||
// StoreUTXODiff stores the given utxoDiff for the given blockHash
|
||||
|
Loading…
x
Reference in New Issue
Block a user