Skip to content

Commit

Permalink
Add comment to tree.load()
Browse files Browse the repository at this point in the history
  • Loading branch information
jaekwon committed Dec 9, 2017
1 parent 6d19e9f commit 60a22e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ func (tree *Tree) load(version int64, root []byte) {
return
}
tree.root = tree.ndb.GetNode(root)

// This is wrong. When saving a tree w/o updates, the tree's root node's
// version gets stale.
// tree.version = tree.root.version
tree.version = version
}

Expand Down

0 comments on commit 60a22e3

Please sign in to comment.