Skip to content

Commit

Permalink
chore: fix some function names in comment (#1012)
Browse files Browse the repository at this point in the history
Signed-off-by: cuiyourong <[email protected]>
  • Loading branch information
cuiyourong authored Dec 6, 2024
1 parent 1aaca64 commit a989ed4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/encoding/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func Encode32BytesHash(w io.Writer, bz []byte) error {
return err
}

// encodeBytesSlice length-prefixes the byte slice and returns it.
// EncodeBytesSlice length-prefixes the byte slice and returns it.
func EncodeBytesSlice(bz []byte) ([]byte, error) {
buf := bufPool.Get().(*bytes.Buffer)
buf.Reset()
Expand All @@ -127,7 +127,7 @@ func EncodeBytesSlice(bz []byte) ([]byte, error) {
return bytesCopy, err
}

// encodeBytesSize returns the byte size of the given slice including length-prefixing.
// EncodeBytesSize returns the byte size of the given slice including length-prefixing.
func EncodeBytesSize(bz []byte) int {
return EncodeUvarintSize(uint64(len(bz))) + len(bz)
}
Expand Down
2 changes: 1 addition & 1 deletion mutable_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ func (tree *MutableTree) LoadVersion(targetVersion int64) (int64, error) {
return latestVersion, nil
}

// loadVersionForOverwriting attempts to load a tree at a previously committed
// LoadVersionForOverwriting attempts to load a tree at a previously committed
// version, or the latest version below it. Any versions greater than targetVersion will be deleted.
func (tree *MutableTree) LoadVersionForOverwriting(targetVersion int64) error {
if _, err := tree.LoadVersion(targetVersion); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion mutable_tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestIterateConcurrency(t *testing.T) {
wg.Wait()
}

// TestConcurrency throws "fatal error: concurrent map iteration and map write" and
// TestIteratorConcurrency throws "fatal error: concurrent map iteration and map write" and
// also sometimes "fatal error: concurrent map writes" when fast node is enabled
func TestIteratorConcurrency(t *testing.T) {
if testing.Short() {
Expand Down
4 changes: 2 additions & 2 deletions v2/internal/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func EncodeBytes(w io.Writer, bz []byte) error {
return err
}

// encodeBytesSlice length-prefixes the byte slice and returns it.
// EncodeBytesSlice length-prefixes the byte slice and returns it.
func EncodeBytesSlice(bz []byte) ([]byte, error) {
buf := bufPool.Get().(*bytes.Buffer)
buf.Reset()
Expand All @@ -111,7 +111,7 @@ func EncodeBytesSlice(bz []byte) ([]byte, error) {
return bytesCopy, err
}

// encodeBytesSize returns the byte size of the given slice including length-prefixing.
// EncodeBytesSize returns the byte size of the given slice including length-prefixing.
func EncodeBytesSize(bz []byte) int {
return EncodeUvarintSize(uint64(len(bz))) + len(bz)
}
Expand Down

0 comments on commit a989ed4

Please sign in to comment.