From 182c84137445ba782d3ceb2524d666976da1c73e Mon Sep 17 00:00:00 2001 From: forcedebug <167591285+forcedebug@users.noreply.github.com> Date: Tue, 23 Apr 2024 10:06:50 +0800 Subject: [PATCH] fix: fix function names (#2416) --- cmd/geth/attach_test.go | 2 +- trie/trie_test.go | 2 +- triedb/database.go | 2 +- triedb/pathdb/database_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/geth/attach_test.go b/cmd/geth/attach_test.go index 91007ccf65..ceae3a122e 100644 --- a/cmd/geth/attach_test.go +++ b/cmd/geth/attach_test.go @@ -48,7 +48,7 @@ func TestAttachWithHeaders(t *testing.T) { // This is fixed in a follow-up PR. } -// TestAttachWithHeaders tests that 'geth db --remotedb' with custom headers works, i.e +// TestRemoteDbWithHeaders tests that 'geth db --remotedb' with custom headers works, i.e // that custom headers are forwarded to the target. func TestRemoteDbWithHeaders(t *testing.T) { t.Parallel() diff --git a/trie/trie_test.go b/trie/trie_test.go index 920594fdd2..73a72222f4 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -1066,7 +1066,7 @@ func TestCommitSequenceSmallRoot(t *testing.T) { } } -// BenchmarkCommitAfterHashFixedSize benchmarks the Commit (after Hash) of a fixed number of updates to a trie. +// BenchmarkHashFixedSize benchmarks the Commit (after Hash) of a fixed number of updates to a trie. // This benchmark is meant to capture the difference on efficiency of small versus large changes. Typically, // storage tries are small (a couple of entries), whereas the full post-block account trie update is large (a couple // of thousand entries) diff --git a/triedb/database.go b/triedb/database.go index fabd7ffc8f..66c2740911 100644 --- a/triedb/database.go +++ b/triedb/database.go @@ -393,7 +393,7 @@ func (db *Database) Head() common.Hash { return pdb.Head() } -// GetAllHash returns all MPT root hash in diffLayer and diskLayer. +// GetAllRooHash returns all MPT root hash in diffLayer and diskLayer. // It's only supported by path-based database and will return nil for // others. func (db *Database) GetAllRooHash() [][]string { diff --git a/triedb/pathdb/database_test.go b/triedb/pathdb/database_test.go index 6fcb160bdd..123b4e9ebf 100644 --- a/triedb/pathdb/database_test.go +++ b/triedb/pathdb/database_test.go @@ -302,7 +302,7 @@ func (t *tester) generate(parent common.Hash) (common.Hash, *trienode.MergedNode return root, ctx.nodes, triestate.New(ctx.accountOrigin, ctx.storageOrigin, nil) } -// lastRoot returns the latest root hash, or empty if nothing is cached. +// lastHash returns the latest root hash, or empty if nothing is cached. func (t *tester) lastHash() common.Hash { if len(t.roots) == 0 { return common.Hash{}