mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
b2fd91610a
commit
af692eb8ba
|
@ -577,7 +577,7 @@ peerDownloadLoop peer = do
|
||||||
|
|
||||||
seenTimes <- liftIO $ readTVarIO seenBlocks <&> fromMaybe 0 . HashMap.lookup h
|
seenTimes <- liftIO $ readTVarIO seenBlocks <&> fromMaybe 0 . HashMap.lookup h
|
||||||
|
|
||||||
when ( seenTimes > 50 ) do
|
when ( seenTimes > 100 ) do
|
||||||
trace $ "ban block" <+> pretty h <+> "for a while" <+> parens (pretty seenTimes)
|
trace $ "ban block" <+> pretty h <+> "for a while" <+> parens (pretty seenTimes)
|
||||||
liftIO $ atomically $ modifyTVar seenBlocks (HashMap.delete h)
|
liftIO $ atomically $ modifyTVar seenBlocks (HashMap.delete h)
|
||||||
liftIO $ Cache.insert bannedBlocks h ()
|
liftIO $ Cache.insert bannedBlocks h ()
|
||||||
|
|
Loading…
Reference in New Issue