aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/enr/entries.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/enr/entries.go')
-rw-r--r--p2p/enr/entries.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/p2p/enr/entries.go b/p2p/enr/entries.go
index 71c7653a2..347990ab6 100644
--- a/p2p/enr/entries.go
+++ b/p2p/enr/entries.go
@@ -17,12 +17,10 @@
package enr
import (
- "crypto/ecdsa"
"fmt"
"io"
"net"
- "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rlp"
)
@@ -98,30 +96,6 @@ func (v *IP) DecodeRLP(s *rlp.Stream) error {
return nil
}
-// Secp256k1 is the "secp256k1" key, which holds a public key.
-type Secp256k1 ecdsa.PublicKey
-
-func (v Secp256k1) ENRKey() string { return "secp256k1" }
-
-// EncodeRLP implements rlp.Encoder.
-func (v Secp256k1) EncodeRLP(w io.Writer) error {
- return rlp.Encode(w, crypto.CompressPubkey((*ecdsa.PublicKey)(&v)))
-}
-
-// DecodeRLP implements rlp.Decoder.
-func (v *Secp256k1) DecodeRLP(s *rlp.Stream) error {
- buf, err := s.Bytes()
- if err != nil {
- return err
- }
- pk, err := crypto.DecompressPubkey(buf)
- if err != nil {
- return err
- }
- *v = (Secp256k1)(*pk)
- return nil
-}
-
// KeyError is an error related to a key.
type KeyError struct {
Key string