mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-06 14:16:43 +00:00
Increase stores cache (#1485)
Co-authored-by: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com>
This commit is contained in:
parent
44280b9006
commit
6f53da18b1
@ -70,6 +70,10 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
|
|||||||
|
|
||||||
pruningWindowSizeForCaches := int(dagParams.PruningDepth())
|
pruningWindowSizeForCaches := int(dagParams.PruningDepth())
|
||||||
|
|
||||||
|
// This is used for caches that are used as part of deletePastBlocks that need to traverse until
|
||||||
|
// the previous pruning point.
|
||||||
|
pruningWindowSizePlusFinalityDepthForCache := int(dagParams.PruningDepth() + dagParams.FinalityDepth())
|
||||||
|
|
||||||
// Data Structures
|
// Data Structures
|
||||||
acceptanceDataStore := acceptancedatastore.New(200)
|
acceptanceDataStore := acceptancedatastore.New(200)
|
||||||
blockStore, err := blockstore.New(dbManager, 200)
|
blockStore, err := blockstore.New(dbManager, 200)
|
||||||
@ -80,11 +84,12 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
blockRelationStore := blockrelationstore.New(pruningWindowSizeForCaches)
|
blockRelationStore := blockrelationstore.New(pruningWindowSizePlusFinalityDepthForCache)
|
||||||
blockStatusStore := blockstatusstore.New(200)
|
|
||||||
|
blockStatusStore := blockstatusstore.New(pruningWindowSizePlusFinalityDepthForCache)
|
||||||
multisetStore := multisetstore.New(200)
|
multisetStore := multisetstore.New(200)
|
||||||
pruningStore := pruningstore.New()
|
pruningStore := pruningstore.New()
|
||||||
reachabilityDataStore := reachabilitydatastore.New(pruningWindowSizeForCaches)
|
reachabilityDataStore := reachabilitydatastore.New(pruningWindowSizePlusFinalityDepthForCache)
|
||||||
utxoDiffStore := utxodiffstore.New(200)
|
utxoDiffStore := utxodiffstore.New(200)
|
||||||
consensusStateStore := consensusstatestore.New(10_000)
|
consensusStateStore := consensusstatestore.New(10_000)
|
||||||
ghostdagDataStore := ghostdagdatastore.New(pruningWindowSizeForCaches)
|
ghostdagDataStore := ghostdagdatastore.New(pruningWindowSizeForCaches)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user