diff options
author | kiel barry <kiel.j.barry@gmail.com> | 2018-05-22 04:41:31 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-05-22 04:41:31 +0800 |
commit | 0fe47e98c4d93f952dc7415f401fd03b2664a21d (patch) | |
tree | ae30e450e853fe8a03760496b87259077a760e68 /trie/secure_trie.go | |
parent | 415969f534d8122e717e18abafdc8ec7bb913a84 (diff) | |
download | dexon-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar dexon-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.gz dexon-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.bz2 dexon-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.lz dexon-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.xz dexon-0fe47e98c4d93f952dc7415f401fd03b2664a21d.tar.zst dexon-0fe47e98c4d93f952dc7415f401fd03b2664a21d.zip |
trie: fixes to comply with golint (#16771)
Diffstat (limited to 'trie/secure_trie.go')
-rw-r--r-- | trie/secure_trie.go | 5 |
1 files changed, 5 insertions, 0 deletions
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 |