Procházet zdrojové kódy

trie: remove unused originalRoot field (#17862)

Péter Szilágyi před 7 roky
rodič
revize
53634f1e04
1 změnil soubory, kde provedl 3 přidání a 5 odebrání
  1. 3 5
      trie/trie.go

+ 3 - 5
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)