trie: fixes to comply with golint (#16771)

This commit is contained in:
kiel barry
2018-05-21 13:41:31 -07:00
committed by Péter Szilágyi
parent 415969f534
commit 0fe47e98c4
5 changed files with 26 additions and 21 deletions

View File

@ -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