mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
RPC: don't save nil's to blocksLRU (#2937)
This commit is contained in:
parent
f96a591611
commit
c7a014b72f
@ -163,7 +163,9 @@ func (api *BaseAPI) blockWithSenders(tx kv.Tx, hash common.Hash, number uint64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if block == nil { // don't save nil's to cache
|
||||
return nil, nil
|
||||
}
|
||||
if api.blocksLRU != nil {
|
||||
api.blocksLRU.Add(hash, block)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user