File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Block Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -21,19 +21,26 @@ import Data.Word (Word64)
21
21
import GHC.Generics (Generic )
22
22
import NoThunks.Class
23
23
import Ouroboros.Consensus.Block.Abstract
24
+ import Ouroboros.Consensus.Util.Condense
24
25
import Quiet (Quiet (.. ))
25
26
26
27
newtype PerasRoundNo = PerasRoundNo { unPerasRoundNo :: Word64 }
27
28
deriving Show via Quiet PerasRoundNo
28
29
deriving stock Generic
29
30
deriving newtype (Eq , Ord , NoThunks )
30
31
32
+ instance Condense PerasRoundNo where
33
+ condense = show . unPerasRoundNo
34
+
31
35
newtype PerasWeight = PerasWeight { unPerasWeight :: Word64 }
32
36
deriving Show via Quiet PerasWeight
33
37
deriving stock Generic
34
38
deriving newtype (Eq , Ord , NoThunks )
35
39
deriving (Semigroup , Monoid ) via Sum Word64
36
40
41
+ instance Condense PerasWeight where
42
+ condense = show . unPerasWeight
43
+
37
44
-- | TODO this will become a Ledger protocol parameter
38
45
boostPerCert :: PerasWeight
39
46
boostPerCert = PerasWeight 15
You can’t perform that action at this time.
0 commit comments