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

[CO-354] Make use of an Int32 instead of a Word32 in NetworkMagic #3578

Merged
merged 1 commit into from
Sep 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/src/Pos/Core/NetworkMagic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Pos.Util.Util (cerealError)
-- conversion bugs.
data NetworkMagic
= NMNothing
| NMJust !Word32
| NMJust !Int32
deriving (Show, Eq, Ord, Generic)

instance NFData NetworkMagic
Expand All @@ -44,4 +44,4 @@ instance SafeCopy NetworkMagic where
makeNetworkMagic :: ProtocolMagic -> NetworkMagic
makeNetworkMagic pm = case getRequiresNetworkMagic pm of
NMMustBeNothing -> NMNothing
NMMustBeJust -> NMJust (fromIntegral (getProtocolMagic pm))
NMMustBeJust -> NMJust (getProtocolMagic pm)