Skip to content

Commit

Permalink
chore: fix some function names (#10117)
Browse files Browse the repository at this point in the history
Signed-off-by: luchenhan <hanluchen@aliyun.com>
  • Loading branch information
luchenhan authored Apr 29, 2024
1 parent 2b83da1 commit 06dfaea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit 06dfaea

Please sign in to comment.