Skip to content

Commit

Permalink
fast-exist FindRetentionBound
Browse files Browse the repository at this point in the history
  • Loading branch information
tsahee committed Aug 30, 2022
1 parent f490228 commit 47ee58b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/blockchain_arbitrum.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ func (bc *BlockChain) FindRetentionBound() uint64 {
minimumSpan := bc.cacheConfig.TriesInMemory
minimumAge := uint64(bc.cacheConfig.TrieRetention.Seconds())

if minimumAge == 0 {
return minimumSpan
}

saturatingCast := func(value int64) uint64 {
if value < 0 {
return 0
Expand Down

0 comments on commit 47ee58b

Please sign in to comment.