aboutsummaryrefslogtreecommitdiff
path: root/peer/messages.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-06-16 02:54:33 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-06-16 02:54:33 +0200
commit39decb03c0d3ff44f08cc4a587813e771f2d853b (patch)
treed597a672a439cd52a05efa5994775c56aa606617 /peer/messages.go
parent36b8cd0ad32bcd967dc98e1ae91943355a5c388e (diff)
split
Diffstat (limited to 'peer/messages.go')
-rw-r--r--peer/messages.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/peer/messages.go b/peer/messages.go
index 1ddaf83..a14de46 100644
--- a/peer/messages.go
+++ b/peer/messages.go
@@ -1,11 +1,5 @@
package peer
-import (
- "crypto/rand"
- "fmt"
- "math/big"
-)
-
type Message int
const (
@@ -23,12 +17,3 @@ const (
)
const Proto = `BitTorrent protocol`
-
-func NewID() (string, error) {
- limit := new(big.Int).Lsh(big.NewInt(1), 80)
- id, err := rand.Int(rand.Reader, limit)
- if err != nil {
- return "", err
- }
- return fmt.Sprintf("%0.20x", id), nil
-}