From 5ee337926f36382696dd90e53c900cc978225ff9 Mon Sep 17 00:00:00 2001 From: Matthew Halpern Date: Thu, 14 Feb 2019 17:50:55 -0800 Subject: [PATCH] p2p/*: remove unused functions --- p2p/discover/table_util_test.go | 9 --------- p2p/enode/nodedb.go | 8 -------- 2 files changed, 17 deletions(-) diff --git a/p2p/discover/table_util_test.go b/p2p/discover/table_util_test.go index e61c9e6fc5..f4dbc25a37 100644 --- a/p2p/discover/table_util_test.go +++ b/p2p/discover/table_util_test.go @@ -17,7 +17,6 @@ package discover import ( - "crypto/ecdsa" "encoding/hex" "fmt" "math/rand" @@ -167,11 +166,3 @@ func hexEncPubkey(h string) (ret encPubkey) { copy(ret[:], b) return ret } - -func hexPubkey(h string) *ecdsa.PublicKey { - k, err := decodePubkey(hexEncPubkey(h)) - if err != nil { - panic(err) - } - return k -} diff --git a/p2p/enode/nodedb.go b/p2p/enode/nodedb.go index 9353b155c1..0691c6333d 100644 --- a/p2p/enode/nodedb.go +++ b/p2p/enode/nodedb.go @@ -172,14 +172,6 @@ func splitNodeItemKey(key []byte) (id ID, ip net.IP, field string) { 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. func (db *DB) fetchInt64(key []byte) int64 { blob, err := db.lvl.Get(key, nil)