Skip to content

Commit

Permalink
config: reduce sidecar cache to 1024 and rename (#2297)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzckck authored Mar 18, 2024
1 parent dda4ba0 commit 484fbff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const (
blockCacheLimit = 256
diffLayerCacheLimit = 1024
receiptsCacheLimit = 10000
blobsCacheLimit = 10000
sidecarsCacheLimit = 1024
txLookupCacheLimit = 1024
maxBadBlockLimit = 16
maxFutureBlocks = 256
Expand Down Expand Up @@ -362,7 +362,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
bodyCache: lru.NewCache[common.Hash, *types.Body](bodyCacheLimit),
bodyRLPCache: lru.NewCache[common.Hash, rlp.RawValue](bodyCacheLimit),
receiptsCache: lru.NewCache[common.Hash, []*types.Receipt](receiptsCacheLimit),
sidecarsCache: lru.NewCache[common.Hash, types.BlobTxSidecars](blobsCacheLimit),
sidecarsCache: lru.NewCache[common.Hash, types.BlobTxSidecars](sidecarsCacheLimit),
blockCache: lru.NewCache[common.Hash, *types.Block](blockCacheLimit),
txLookupCache: lru.NewCache[common.Hash, txLookup](txLookupCacheLimit),
futureBlocks: lru.NewCache[common.Hash, *types.Block](maxFutureBlocks),
Expand Down
2 changes: 1 addition & 1 deletion internal/ethapi/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ func (b testBackend) GetBlobSidecars(ctx context.Context, hash common.Hash) (typ
if header == nil || err != nil {
return nil, err
}
blobSidecars := rawdb.ReadRawBlobs(b.db, hash, header.Number.Uint64())
blobSidecars := rawdb.ReadRawBlobSidecars(b.db, hash, header.Number.Uint64())
return blobSidecars, nil
}
func (b testBackend) GetTd(ctx context.Context, hash common.Hash) *big.Int {
Expand Down

0 comments on commit 484fbff

Please sign in to comment.