This commit is contained in:
Dmitry Zuikov 2023-01-24 09:47:33 +03:00
parent c56400a6b0
commit eb452c06f5
1 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,7 @@ module HBS2.Actors.ChunkWriter
, commitBlock , commitBlock
, writeChunk , writeChunk
, getHash , getHash
, blocksInProcess
) where ) where
import HBS2.Prelude import HBS2.Prelude
@ -70,6 +71,11 @@ data ChunkWriter h m = forall a . ( MonadIO m
} }
blocksInProcess :: MonadIO m => ChunkWriter h m -> m Int
blocksInProcess cw = liftIO $ Cache.purgeExpired cache >> Cache.size cache
where
cache = perBlock cw
runChunkWriter :: forall h m . ( Eq (Hash h) runChunkWriter :: forall h m . ( Eq (Hash h)
, Hashable (Hash h) , Hashable (Hash h)
, MonadIO m ) , MonadIO m )