From 01b294880b7afc2b78662ead0b0bbd6c5bca32a2 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Fri, 6 Sep 2024 18:28:35 +0800 Subject: [PATCH] core/state/snapshot: add a todo for the potential hang --- core/state/snapshot/snapshot.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/state/snapshot/snapshot.go b/core/state/snapshot/snapshot.go index 6cc8f3831c..d1ffb5cc2d 100644 --- a/core/state/snapshot/snapshot.go +++ b/core/state/snapshot/snapshot.go @@ -258,6 +258,8 @@ func (t *Tree) Disable() { for _, layer := range t.layers { switch layer := layer.(type) { case *diskLayer: + // TODO this function will hang if it's called twice. Will + // fix it in the following PRs. layer.stopGeneration() layer.markStale() layer.Release() @@ -715,6 +717,8 @@ func (t *Tree) Rebuild(root common.Hash) { for _, layer := range t.layers { switch layer := layer.(type) { case *diskLayer: + // TODO this function will hang if it's called twice. Will + // fix it in the following PRs. layer.stopGeneration() layer.markStale() layer.Release()