integrate snapshot feature with statedb and add cache to states

feature/state_pruning_codes
“GheisMohammadi” 2 years ago
parent 5621ca98f0
commit 15674d5a45
No known key found for this signature in database
GPG Key ID: 15073AED3829FE90
  1. 1
      core/blockchain_impl.go
  2. 1
      core/state/snapshot/snapshot.go

@ -262,7 +262,6 @@ func newBlockChainWithOptions(
if stateCache == nil { if stateCache == nil {
stateCache = state.NewDatabaseWithNodeDB(db, triedb) stateCache = state.NewDatabaseWithNodeDB(db, triedb)
} }
bodyCache, _ := lru.New(bodyCacheLimit) bodyCache, _ := lru.New(bodyCacheLimit)
bodyRLPCache, _ := lru.New(bodyCacheLimit) bodyRLPCache, _ := lru.New(bodyCacheLimit)
receiptsCache, _ := lru.New(receiptsCacheLimit) receiptsCache, _ := lru.New(receiptsCacheLimit)

@ -206,7 +206,6 @@ func New(config Config, diskdb ethdb.KeyValueStore, triedb *trie.Database, root
utils.Logger().Warn().Err(err).Msg("Snapshot maintenance disabled (syncing)") utils.Logger().Warn().Err(err).Msg("Snapshot maintenance disabled (syncing)")
return snap, nil return snap, nil
} }
// Create the building waiter if the background generation is allowed // Create the building waiter if the background generation is allowed
if !config.NoBuild && !config.AsyncBuild { if !config.NoBuild && !config.AsyncBuild {
defer snap.waitBuild() defer snap.waitBuild()

Loading…
Cancel
Save