summaryrefslogtreecommitdiff
path: root/ToxAddress.hs
diff options
context:
space:
mode:
Diffstat (limited to 'ToxAddress.hs')
-rw-r--r--ToxAddress.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/ToxAddress.hs b/ToxAddress.hs
index f0d4aba3..ea69f6e3 100644
--- a/ToxAddress.hs
+++ b/ToxAddress.hs
@@ -13,7 +13,7 @@
13{-# LANGUAGE ScopedTypeVariables #-} 13{-# LANGUAGE ScopedTypeVariables #-}
14{-# LANGUAGE TupleSections #-} 14{-# LANGUAGE TupleSections #-}
15{-# LANGUAGE TypeApplications #-} 15{-# LANGUAGE TypeApplications #-}
16module ToxAddress (NodeInfo(..),NodeId(..),nodeInfo) where 16module ToxAddress (NodeInfo(..),NodeId(..),nodeInfo,zeroID) where
17 17
18import Control.Applicative 18import Control.Applicative
19import Control.Monad 19import Control.Monad
@@ -88,6 +88,9 @@ instance S.Serialize NodeId where
88 88
89instance Bits NodeId where -- TODO 89instance Bits NodeId where -- TODO
90 90
91instance Hashable NodeId where
92 hashWithSalt salt (NodeId key) = hashWithSalt salt (BA.convert key :: ByteString)
93
91instance FiniteBits NodeId where 94instance FiniteBits NodeId where
92 finiteBitSize _ = 256 95 finiteBitSize _ = 256
93 96