cmd/geth: release iterator in checkStateContent

checkStateContent wraps a database iterator but never released it,
which can hold a read snapshot open for the duration of the scan.
This commit is contained in:
0xoasis 2026-07-18 00:12:51 +08:00
parent 06b23b4293
commit 307d769ea5

View file

@ -409,6 +409,7 @@ func checkStateContent(ctx *cli.Context) error {
startTime = time.Now()
lastLog = time.Now()
)
defer it.Release()
for it.Next() {
count++
k := it.Key()