diff --git a/pkg/crypto/crypto.go b/pkg/crypto/crypto.go index c5ac2c7128c..6c43a1e4528 100644 --- a/pkg/crypto/crypto.go +++ b/pkg/crypto/crypto.go @@ -92,12 +92,12 @@ func GenerateSecp256r1Key() (*ecdsa.PrivateKey, error) { return ecdsa.GenerateKey(elliptic.P256(), rand.Reader) } -// EncodeSecp256k1PrivateKey encodes raw ECDSA private key. +// EncodeSecp256r1PrivateKey encodes raw ECDSA private key. func EncodeSecp256r1PrivateKey(k *ecdsa.PrivateKey) ([]byte, error) { return x509.MarshalECPrivateKey(k) } -// DecodeSecp256k1PrivateKey decodes raw ECDSA private key. +// DecodeSecp256r1PrivateKey decodes raw ECDSA private key. func DecodeSecp256r1PrivateKey(data []byte) (*ecdsa.PrivateKey, error) { return x509.ParseECPrivateKey(data) } diff --git a/pkg/file/pipeline/hashtrie/hashtrie.go b/pkg/file/pipeline/hashtrie/hashtrie.go index 7ef5eb350a1..1aff8c0df66 100644 --- a/pkg/file/pipeline/hashtrie/hashtrie.go +++ b/pkg/file/pipeline/hashtrie/hashtrie.go @@ -109,7 +109,7 @@ func (h *hashTrieWriter) writeToDataLevel(span, ref, key, data []byte) error { return h.rParams.ChunkWrite(0, data, h.parityChunkFn) } -// wrapLevel wraps an existing level and writes the resulting hash to the following level +// wrapFullLevel wraps an existing level and writes the resulting hash to the following level // then truncates the current level data by shifting the cursors. // Steps are performed in the following order: // - take all of the data in the current level diff --git a/pkg/p2p/libp2p/peer.go b/pkg/p2p/libp2p/peer.go index 5aa0f75713a..7966454f295 100644 --- a/pkg/p2p/libp2p/peer.go +++ b/pkg/p2p/libp2p/peer.go @@ -51,7 +51,7 @@ func (r *peerRegistry) Exists(overlay swarm.Address) (found bool) { return found } -// Disconnect removes the peer from registry in disconnect. +// Disconnected removes the peer from registry in disconnect. // peerRegistry has to be set by network.Network.Notify(). func (r *peerRegistry) Disconnected(_ network.Network, c network.Conn) { peerID := c.RemotePeer()