This commit is contained in:
Dmitry Zuikov 2023-02-25 16:42:35 +03:00
parent b2fd91610a
commit af692eb8ba
1 changed files with 1 additions and 1 deletions

View File

@ -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 ()