diff --git a/trie/proof.go b/trie/proof.go index f8d933c962..f2c4658c49 100644 --- a/trie/proof.go +++ b/trie/proof.go @@ -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. diff --git a/trie/trie.go b/trie/trie.go index 4deed84e3e..2e27f4f105 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -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