Skip to content

Commit

Permalink
fix journal leak in clear smt
Browse files Browse the repository at this point in the history
  • Loading branch information
liangxuuu committed Mar 12, 2023
1 parent cd6fcd6 commit 7e60c08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions smt.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ func (tree *BNBSparseMerkleTree) Clear() error {
tree.root = NewTreeNode(0, 0, tree.nilHashes, tree.hasher)
tree.version = Version(0)
tree.recentVersion = Version(0)
tree.journal = newJournal()

storageTreeNode := &StorageTreeNode{}
tree.root = storageTreeNode.ToTreeNode(0, tree.nilHashes, tree.hasher)
Expand Down

0 comments on commit 7e60c08

Please sign in to comment.