From 0fe47e98c4d93f952dc7415f401fd03b2664a21d Mon Sep 17 00:00:00 2001 From: kiel barry Date: Mon, 21 May 2018 13:41:31 -0700 Subject: trie: fixes to comply with golint (#16771) --- trie/secure_trie.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'trie/secure_trie.go') diff --git a/trie/secure_trie.go b/trie/secure_trie.go index 3881ee18a..6a50cfd5a 100644 --- a/trie/secure_trie.go +++ b/trie/secure_trie.go @@ -155,14 +155,19 @@ func (t *SecureTrie) Commit(onleaf LeafCallback) (root common.Hash, err error) { return t.trie.Commit(onleaf) } +// Hash returns the root hash of SecureTrie. It does not write to the +// database and can be used even if the trie doesn't have one. func (t *SecureTrie) Hash() common.Hash { return t.trie.Hash() } +// Root returns the root hash of SecureTrie. +// Deprecated: use Hash instead. func (t *SecureTrie) Root() []byte { return t.trie.Root() } +// Copy returns a copy of SecureTrie. func (t *SecureTrie) Copy() *SecureTrie { cpy := *t return &cpy -- cgit