trie: goimports fixes

This commit is contained in:
Martin Holst Swende 2020-01-14 09:47:53 +01:00
parent 8e8e8d6444
commit 405b06a6a6
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
2 changed files with 3 additions and 3 deletions

View file

@ -72,8 +72,8 @@ func (t *Trie) Prove(key []byte, fromLevel uint, proofDb ethdb.KeyValueWriter) e
fromLevel--
continue
}
var hn = n
n,hn = hasher.proofHash(n)
var hn node
n, hn = hasher.proofHash(n)
if hash, ok := hn.(hashNode); ok || i == 0 {
// If the node's database encoding is a hash (or is the
// root node), it becomes a proof element.

View file

@ -451,7 +451,7 @@ func (t *Trie) Commit(onleaf LeafCallback) (root common.Hash, err error) {
if err != nil {
return common.Hash{}, err
}
if common.BytesToHash(newRoot) != rootHash{
if common.BytesToHash(newRoot) != rootHash {
panic(fmt.Sprintf("Committed root %x != roothash %x", newRoot, rootHash))
}
t.root = newRoot