reduce file handle needed for level db (#3295)

pull/3262/head
Rongjian Lan 4 years ago committed by GitHub
parent 269d59c910
commit e0d7df03f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      internal/shardchain/dbfactory.go

@ -22,7 +22,7 @@ type LDBFactory struct {
// NewChainDB returns a new LDB for the blockchain for given shard. // NewChainDB returns a new LDB for the blockchain for given shard.
func (f *LDBFactory) NewChainDB(shardID uint32) (ethdb.Database, error) { func (f *LDBFactory) NewChainDB(shardID uint32) (ethdb.Database, error) {
dir := path.Join(f.RootDir, fmt.Sprintf("harmony_db_%d", shardID)) dir := path.Join(f.RootDir, fmt.Sprintf("harmony_db_%d", shardID))
return ethdb.NewLDBDatabase(dir, 128, 1024) return ethdb.NewLDBDatabase(dir, 128, 64)
} }
// MemDBFactory is a memory-backed blockchain database factory. // MemDBFactory is a memory-backed blockchain database factory.

Loading…
Cancel
Save