p2p/*: remove unused functions

This commit is contained in:
Matthew Halpern 2019-02-14 17:50:55 -08:00
parent 7f6b05aa43
commit 5ee337926f
2 changed files with 0 additions and 17 deletions

View file

@ -17,7 +17,6 @@
package discover package discover
import ( import (
"crypto/ecdsa"
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"math/rand" "math/rand"
@ -167,11 +166,3 @@ func hexEncPubkey(h string) (ret encPubkey) {
copy(ret[:], b) copy(ret[:], b)
return ret return ret
} }
func hexPubkey(h string) *ecdsa.PublicKey {
k, err := decodePubkey(hexEncPubkey(h))
if err != nil {
panic(err)
}
return k
}

View file

@ -172,14 +172,6 @@ func splitNodeItemKey(key []byte) (id ID, ip net.IP, field string) {
return id, ip, field return id, ip, field
} }
// localItemKey returns the key of a local node item.
func localItemKey(id ID, field string) []byte {
key := append([]byte(dbLocalPrefix), id[:]...)
key = append(key, ':')
key = append(key, field...)
return key
}
// fetchInt64 retrieves an integer associated with a particular key. // fetchInt64 retrieves an integer associated with a particular key.
func (db *DB) fetchInt64(key []byte) int64 { func (db *DB) fetchInt64(key []byte) int64 {
blob, err := db.lvl.Get(key, nil) blob, err := db.lvl.Get(key, nil)