cmd/geth: release storage iterator in snapshot dump (#35222)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

## Summary

- Release the storage iterator after iterating slots in `geth snapshot
dump`, matching the existing account iterator cleanup.

## Test plan

- [x] `go build ./cmd/geth/...`
- [ ] Manual: run `geth snapshot dump` on a node with storage data and
verify output is unchanged
This commit is contained in:
cui 2026-06-26 16:10:56 +08:00 committed by GitHub
parent 4387f433c9
commit ab134b2101
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -922,6 +922,7 @@ func dumpState(ctx *cli.Context) error {
for stIt.Next() {
da.Storage[stIt.Hash()] = common.Bytes2Hex(stIt.Slot())
}
stIt.Release()
}
enc.Encode(da)
accounts++