summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Network/BitTorrent/Address.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/Address.hs b/src/Network/BitTorrent/Address.hs
index 3159fab0..9f9340d1 100644
--- a/src/Network/BitTorrent/Address.hs
+++ b/src/Network/BitTorrent/Address.hs
@@ -643,7 +643,8 @@ instance Serialize NodeId where
643-- | ASCII encoded. 643-- | ASCII encoded.
644instance IsString NodeId where 644instance IsString NodeId where
645 fromString str 645 fromString str
646 | L.length str == nodeIdSize = NodeId (fromString str) 646 | L.length str == nodeIdSize = NodeId (fromString str)
647 | L.length str == 2 * nodeIdSize = NodeId (fst $ Base16.decode $ fromString str)
647 | otherwise = error "fromString: invalid NodeId length" 648 | otherwise = error "fromString: invalid NodeId length"
648 {-# INLINE fromString #-} 649 {-# INLINE fromString #-}
649 650