mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
c56400a6b0
commit
eb452c06f5
|
@ -9,6 +9,7 @@ module HBS2.Actors.ChunkWriter
|
|||
, commitBlock
|
||||
, writeChunk
|
||||
, getHash
|
||||
, blocksInProcess
|
||||
) where
|
||||
|
||||
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)
|
||||
, Hashable (Hash h)
|
||||
, MonadIO m )
|
||||
|
|
Loading…
Reference in New Issue