From 53634f1e04a7ff020fbdeb71f48dbcf33d530125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 8 Oct 2018 14:16:16 +0300 Subject: [PATCH] trie: remove unused originalRoot field (#17862) --- trie/trie.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/trie/trie.go b/trie/trie.go index e920ccd23..af424d4ac 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -65,9 +65,8 @@ type LeafCallback func(leaf []byte, parent common.Hash) error // // Trie is not safe for concurrent use. type Trie struct { - db *Database - root node - originalRoot common.Hash + db *Database + root node // Cache generation values. // cachegen increases by one with each commit operation. @@ -98,8 +97,7 @@ func New(root common.Hash, db *Database) (*Trie, error) { panic("trie.New called without a database") } trie := &Trie{ - db: db, - originalRoot: root, + db: db, } if root != (common.Hash{}) && root != emptyRoot { rootnode, err := trie.resolveHash(root[:], nil)