Skip to content

Commit

Permalink
Print the amount of honest peers and adversaries in traces
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed May 3, 2024
1 parent f6764e7 commit 3a7e4d4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import Control.Monad.ST (ST)
import Data.Foldable (toList)
import Data.Functor (($>))
import Data.List (mapAccumL, partition, scanl')
import qualified Data.Map.Strict as Map
import Data.Maybe (catMaybes, fromMaybe, mapMaybe)
import Data.Time (DiffTime)
import Data.Word (Word64)
Expand Down Expand Up @@ -96,6 +97,9 @@ prettyPeersSchedule ::
PeersSchedule blk ->
[String]
prettyPeersSchedule peers =
[ "honest peers: 1"
, "adversaries: " ++ show (Map.size (others peers))
] ++
zipWith3
(\number time peerState ->
number ++ ": " ++ peerState ++ " @ " ++ time
Expand Down

0 comments on commit 3a7e4d4

Please sign in to comment.