Skip to content

Conversation

@jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Jul 17, 2025

The metadata was read and checked before

metadata := loadIndexMetadata(r.disk)
if metadata == nil || metadata.Last < lastID {
indexed := "null"
if metadata != nil {
indexed = fmt.Sprintf("%d", metadata.Last)
}
return nil, fmt.Errorf("state history is not fully indexed, requested: %d, indexed: %s", stateID, indexed)
}

So I think there's no need to read the metadata again.

Signed-off-by: jsvisa <delweng@gmail.com>
@jsvisa jsvisa requested a review from rjl493456442 as a code owner July 17, 2025 00:53
@rjl493456442 rjl493456442 added this to the 1.16.2 milestone Jul 17, 2025
@rjl493456442 rjl493456442 merged commit f36d349 into ethereum:master Jul 17, 2025
4 of 5 checks passed
@jsvisa jsvisa deleted the triedb-limit-tag branch July 17, 2025 09:08
howjmay pushed a commit to iotaledger/go-ethereum that referenced this pull request Aug 27, 2025
gballet pushed a commit to gballet/go-ethereum that referenced this pull request Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants