Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some function names #10117

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion p2p/discover/v5wire/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func (c *Codec) encodeWhoareyou(toID enode.ID, packet *Whoareyou) (Header, error
return head, nil
}

// encodeHandshakeMessage encodes the handshake message packet header.
// encodeHandshakeHeader encodes the handshake message packet header.
func (c *Codec) encodeHandshakeHeader(toID enode.ID, addr string, challenge *Whoareyou) (Header, *session, error) {
// Ensure calling code sets challenge.node.
if challenge.Node == nil {
Expand Down
4 changes: 2 additions & 2 deletions p2p/enode/nodedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func bucketsConfig(_ kv.TableCfg) kv.TableCfg {
}
}

// newMemoryNodeDB creates a new in-memory node database without a persistent backend.
// newMemoryDB creates a new in-memory node database without a persistent backend.
func newMemoryDB(ctx context.Context, logger log.Logger, tmpDir string) (*DB, error) {
db, err := mdbx.NewMDBX(logger).
InMem(tmpDir).
Expand All @@ -114,7 +114,7 @@ func newMemoryDB(ctx context.Context, logger log.Logger, tmpDir string) (*DB, er
return nodeDB, nil
}

// newPersistentNodeDB creates/opens a persistent node database,
// newPersistentDB creates/opens a persistent node database,
// also flushing its contents in case of a version mismatch.
func newPersistentDB(ctx context.Context, logger log.Logger, path string) (*DB, error) {
db, err := mdbx.NewMDBX(logger).
Expand Down
4 changes: 2 additions & 2 deletions p2p/enr/enr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestGetSetID(t *testing.T) {
assert.Equal(t, id, id2)
}

// TestGetSetIP4 tests encoding/decoding and setting/getting of the IP key.
// TestGetSetIPv4 tests encoding/decoding and setting/getting of the IP key.
func TestGetSetIPv4(t *testing.T) {
ip := IPv4{192, 168, 0, 3}
var r Record
Expand All @@ -59,7 +59,7 @@ func TestGetSetIPv4(t *testing.T) {
assert.Equal(t, ip, ip2)
}

// TestGetSetIP6 tests encoding/decoding and setting/getting of the IP6 key.
// TestGetSetIPv6 tests encoding/decoding and setting/getting of the IP6 key.
func TestGetSetIPv6(t *testing.T) {
ip := IPv6{0x20, 0x01, 0x48, 0x60, 0, 0, 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0x00, 0x68}
var r Record
Expand Down
Loading