diff --git a/core/state/snapshot/snapshot.go b/core/state/snapshot/snapshot.go index b485b1a29c..cc4a7d8a99 100644 --- a/core/state/snapshot/snapshot.go +++ b/core/state/snapshot/snapshot.go @@ -350,6 +350,11 @@ func (t *Tree) Update(blockRoot common.Hash, parentRoot common.Hash, destructs m // Save the new snapshot for later t.lock.Lock() defer t.lock.Unlock() + // Update 和 Cap 并发执行,cap 过程中可能已经更换了新的 diskLayer + diskLayer := t.disklayer() + if snap.origin.Root() != diskLayer.Root() { + snap.rebloom(diskLayer) + } t.layers[snap.root] = snap return nil