Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/rawdb: db inspect move 'config' and 'shutdown' into 'meta data' #22978

Merged
merged 2 commits into from
Jun 8, 2021

Conversation

Evolution404
Copy link
Contributor

Avoid the error message of Database contains unaccounted data
image

@@ -369,8 +370,6 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
bytes.HasPrefix(key, []byte("bltIndex-")) ||
bytes.HasPrefix(key, []byte("bltRoot-")): // Bloomtrie sub
bloomTrieNodes.Add(size)
case bytes.Equal(key, uncleanShutdownKey):
shutdownInfo.Add(size)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also count it in the meta.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been counted in the default 😂

Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for catching it!

@holiman
Copy link
Contributor

holiman commented Jun 1, 2021

LGTM, but the linter complains:

core/rawdb/database.go:319: File is not `goimports`-ed (goimports)
		metadata     stat
		unaccounted  stat

It needs a goimports, (depending on your tooling, may be go tool goimports)

unaccounted stat
shutdownInfo stat
metadata stat
unaccounted stat
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I didn't modify these two line, how would this happen?😂

@rjl493456442 rjl493456442 added this to the 1.10.4 milestone Jun 3, 2021
@karalabe karalabe merged commit 248572e into ethereum:master Jun 8, 2021
@Evolution404 Evolution404 deleted the InspectDatabase branch September 29, 2021 02:57
@Evolution404 Evolution404 restored the InspectDatabase branch September 29, 2021 02:58
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
…thereum#22978)

* core/rawdb: db inspect move 'config' and 'shutdown' into 'meta data'

* gofmt
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.

4 participants