Skip to content

Commit

Permalink
trie: remove unused originalRoot field (#17862)
Browse files Browse the repository at this point in the history
  • Loading branch information
karalabe authored and fjl committed Oct 8, 2018
1 parent 31c4e3a commit 53634f1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions trie/trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 53634f1

Please sign in to comment.