diff options
Diffstat (limited to 'src/Network/BitTorrent/Core')
-rw-r--r-- | src/Network/BitTorrent/Core/PeerId.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/Core/PeerId.hs b/src/Network/BitTorrent/Core/PeerId.hs index cab30331..c860d9d4 100644 --- a/src/Network/BitTorrent/Core/PeerId.hs +++ b/src/Network/BitTorrent/Core/PeerId.hs | |||
@@ -73,6 +73,10 @@ newtype PeerId = PeerId { getPeerId :: ByteString } | |||
73 | peerIdLen :: Int | 73 | peerIdLen :: Int |
74 | peerIdLen = 20 | 74 | peerIdLen = 20 |
75 | 75 | ||
76 | -- | For testing purposes only. | ||
77 | instance Default PeerId where | ||
78 | def = azureusStyle defaultClientId defaultVersionNumber "" | ||
79 | |||
76 | instance Hashable PeerId where | 80 | instance Hashable PeerId where |
77 | hashWithSalt = hashUsing getPeerId | 81 | hashWithSalt = hashUsing getPeerId |
78 | {-# INLINE hashWithSalt #-} | 82 | {-# INLINE hashWithSalt #-} |