diff --git a/internal/encoding/encoding.go b/internal/encoding/encoding.go index 6e390c36c..40ff6f667 100644 --- a/internal/encoding/encoding.go +++ b/internal/encoding/encoding.go @@ -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() @@ -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) } diff --git a/mutable_tree.go b/mutable_tree.go index ae7dc6280..a64be8e06 100644 --- a/mutable_tree.go +++ b/mutable_tree.go @@ -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 { diff --git a/mutable_tree_test.go b/mutable_tree_test.go index 24ecbc7da..9545fc1bf 100644 --- a/mutable_tree_test.go +++ b/mutable_tree_test.go @@ -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() { diff --git a/v2/internal/encoding.go b/v2/internal/encoding.go index 17a994bc1..65d3ca3c4 100644 --- a/v2/internal/encoding.go +++ b/v2/internal/encoding.go @@ -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() @@ -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) }