diff options
author | Felix Lange <fjl@twurst.com> | 2019-02-19 20:29:19 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2019-02-19 20:29:19 +0800 |
commit | cf147c71d5d441198a9d326969ffcf7fb1333abd (patch) | |
tree | fd8e9de6a3baec9063da31cd6b69777a2828aee9 | |
parent | f7f6a46029c23d2c1b5a5293d470becbdb4e3366 (diff) | |
download | go-tangerine-cf147c71d5d441198a9d326969ffcf7fb1333abd.tar go-tangerine-cf147c71d5d441198a9d326969ffcf7fb1333abd.tar.gz go-tangerine-cf147c71d5d441198a9d326969ffcf7fb1333abd.tar.bz2 go-tangerine-cf147c71d5d441198a9d326969ffcf7fb1333abd.tar.lz go-tangerine-cf147c71d5d441198a9d326969ffcf7fb1333abd.tar.xz go-tangerine-cf147c71d5d441198a9d326969ffcf7fb1333abd.tar.zst go-tangerine-cf147c71d5d441198a9d326969ffcf7fb1333abd.zip |
p2p/discover: remove unused function
-rw-r--r-- | p2p/discover/table_test.go | 2 | ||||
-rw-r--r-- | p2p/discover/table_util_test.go | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/p2p/discover/table_test.go b/p2p/discover/table_test.go index b5622e3a2..233687d79 100644 --- a/p2p/discover/table_test.go +++ b/p2p/discover/table_test.go @@ -624,6 +624,8 @@ func (tn *preminedTestnet) findnode(toid enode.ID, toaddr *net.UDPAddr, target e func (*preminedTestnet) close() {} func (*preminedTestnet) ping(toid enode.ID, toaddr *net.UDPAddr) error { return nil } +var _ = (*preminedTestnet).mine // avoid linter warning about mine being dead code. + // mine generates a testnet struct literal with nodes at // various distances to the given target. func (tn *preminedTestnet) mine(target encPubkey) { diff --git a/p2p/discover/table_util_test.go b/p2p/discover/table_util_test.go index e61c9e6fc..f4dbc25a3 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 -} |