Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Oct 26, 2024
1 parent 66388af commit c763ca6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jsonrpc/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ type JSONRPCBackend struct {
queuedTxs *lrucache.Cache[string, []byte]
historyCache *lru.Cache[cacheKey, processedFees]

// per block caches
headerCache *lru.Cache[uint64, *coretypes.Header]
blockTxsCache *lru.Cache[uint64, []*rpctypes.RPCTransaction]
blockReceiptsCache *lru.Cache[uint64, []*coretypes.Receipt]
blockHashCache *lru.Cache[common.Hash, uint64]
logsCache *lru.Cache[uint64, []*coretypes.Log]

// per tx caches
txLookupCache *lru.Cache[common.Hash, *rpctypes.RPCTransaction]
receiptCache *lru.Cache[common.Hash, *coretypes.Receipt]
logsCache *lru.Cache[uint64, []*coretypes.Log]

mut sync.Mutex // mutex for accMuts
accMuts map[string]*AccMut
Expand Down

0 comments on commit c763ca6

Please sign in to comment.