From 7e60c0849a3398f835d8947c1b87d2c929e7e835 Mon Sep 17 00:00:00 2001 From: Xu Liang Date: Mon, 13 Mar 2023 00:27:03 +0800 Subject: [PATCH] fix journal leak in clear smt --- smt.go | 1 + 1 file changed, 1 insertion(+) diff --git a/smt.go b/smt.go index 3df0faf..2f7d655 100644 --- a/smt.go +++ b/smt.go @@ -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)