Skip to content

Commit

Permalink
Remove unused deprecated key interfaces. (#15210)
Browse files Browse the repository at this point in the history
* Remove unused deprecated key interfaces.

* Minor

* Minor

* Minor

* Minor

* Minor

* Minor
  • Loading branch information
pavel-raykov authored Nov 14, 2024
1 parent 1956151 commit 7ff9cf9
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 369 deletions.
5 changes: 5 additions & 0 deletions .changeset/healthy-shirts-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#removed Remove unused deprecated key interfaces.
65 changes: 0 additions & 65 deletions core/services/keystore/keys/csakey/key.go

This file was deleted.

58 changes: 0 additions & 58 deletions core/services/keystore/keys/csakey/key_test.go

This file was deleted.

125 changes: 0 additions & 125 deletions core/services/keystore/keys/p2pkey/key.go

This file was deleted.

109 changes: 0 additions & 109 deletions core/services/keystore/keys/p2pkey/key_test.go

This file was deleted.

8 changes: 3 additions & 5 deletions core/services/keystore/keys/p2pkey/key_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"testing"

ragep2ptypes "github.com/smartcontractkit/libocr/ragep2p/types"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand All @@ -22,15 +23,12 @@ func TestP2PKeys_Raw(t *testing.T) {
}

func TestP2PKeys_KeyV2(t *testing.T) {
_, pk, err := ed25519.GenerateKey(rand.Reader)
kv2, err := NewV2()
require.NoError(t, err)

k := Key{PrivKey: pk}
kv2 := k.ToV2()

pkv2 := kv2.PrivKey.Public().(ed25519.PublicKey)

assert.Equal(t, kv2.String(), kv2.GoString())
assert.Equal(t, ragep2ptypes.PeerID(k.PeerID()).String(), kv2.ID())
assert.Equal(t, ragep2ptypes.PeerID(kv2.PeerID()).String(), kv2.ID())
assert.Equal(t, hex.EncodeToString(pkv2), kv2.PublicKeyHex())
}
Loading

0 comments on commit 7ff9cf9

Please sign in to comment.