Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Remove logs which attempt to write entire slot leader schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
intricate committed Feb 15, 2019
1 parent bd7be7e commit 74405c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
19 changes: 7 additions & 12 deletions chain/src/Pos/Chain/Block/Logic/Integrity.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Pos.Chain.Block.Logic.Integrity
import Universum

import Control.Lens (ix)
import Formatting (build, int, sformat, shown, (%))
import Formatting (build, int, sformat, (%))
import Serokell.Data.Memory.Units (Byte, memory)
import Serokell.Util (VerificationRes (..), verifyGeneric)

Expand Down Expand Up @@ -202,9 +202,8 @@ verifyHeader pm VerifyHeaderParams {..} h =
-- and `Original` cases.
ObftLenientLeaders ldrs blkSecurityParam lastBlkSlots ->
[ ( (blockSlotLeader `elem` ldrs)
, sformat ("slot leader who published block, "%build%", is not an acceptable leader. acceptableLeaders: "%shown)
blockSlotLeader
ldrs)
, sformat ("slot leader who published block, "%build%", is not an acceptable leader.")
blockSlotLeader)
, ( (obftLeaderCanMint blockSlotLeader blkSecurityParam lastBlkSlots)
, sformat ("slot leader who published block, "%build%", has minted too many blocks in the past "%build%" slots.")
blockSlotLeader
Expand All @@ -213,20 +212,16 @@ verifyHeader pm VerifyHeaderParams {..} h =

ObftStrictLeaders ldrs ->
[ ( (Just blockSlotLeader == (scheduleSlotLeader ldrs))
, sformat ("slot leader from schedule, "%build%", is different from slot leader who published block, "%build%". slotIndex: "%build%", leaders: "%shown)
, sformat ("slot leader from schedule, "%build%", is different from slot leader who published block, "%build%".")
(scheduleSlotLeader ldrs)
blockSlotLeader
slotIndex
ldrs)
blockSlotLeader)
]

OriginalLeaders ldrs ->
[ ( (Just blockSlotLeader == (scheduleSlotLeader ldrs))
, sformat ("slot leader from schedule, "%build%", is different from slot leader who published block, "%build%". slotIndex: "%build%", leaders: "%shown)
, sformat ("slot leader from schedule, "%build%", is different from slot leader who published block, "%build%".")
(scheduleSlotLeader ldrs)
blockSlotLeader
slotIndex
ldrs)
blockSlotLeader)
]
where
-- Determine whether the leader is allowed to mint a block based on
Expand Down
1 change: 0 additions & 1 deletion db/src/Pos/DB/Block/Slog/Logic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ slogVerifyBlocks genesisConfig curSlot blocks = runExceptT $ do
ObftLenientLeaders (Set.fromList gStakeholders)
(configBlkSecurityParam genesisConfig)
lastSlots
logInfo $ sformat ("slogVerifyBlocks: Leaders are " % shown) leaders


-- This is pretty much equivalent to performing a case on `era` since the
Expand Down

0 comments on commit 74405c0

Please sign in to comment.