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/state/pruner: fix compaction range error #22294

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Feb 8, 2021

@holiman
Copy link
Contributor Author

holiman commented Feb 8, 2021

end = nil
}
log.Info("Compacting database", "range", fmt.Sprintf("%#x-%#x", start, end), "elapsed", common.PrettyDuration(time.Since(cstart)))
Copy link
Member

Choose a reason for hiding this comment

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

If you move it below the if, you'll end up printing nil into hex. Not sure how that behaves.

Copy link
Member

Choose a reason for hiding this comment

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

The very last range's end.

Copy link
Contributor Author

@holiman holiman Feb 8, 2021

Choose a reason for hiding this comment

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

Right, neither did I, that's why I linked to https://play.golang.org/p/66KgDfD-96d above

0x00-0x10
0x10-0x20
0x20-0x30
0x30-0x40
0x40-0x50
0x50-0x60
0x60-0x70
0x70-0x80
0x80-0x90
0x90-0xa0
0xa0-0xb0
0xb0-0xc0
0xc0-0xd0
0xd0-0xe0
0xe0-0xf0
0xf0-

Copy link
Member

Choose a reason for hiding this comment

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

Funky

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