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: Enforce readonly in freezer instantiation #24119

Merged
merged 16 commits into from
Jan 18, 2022
Prev Previous commit
Next Next commit
k->kind
  • Loading branch information
s1na committed Jan 11, 2022
commit 6255ab196c37028ff5c8089016eea27e24ac4ae9
4 changes: 2 additions & 2 deletions core/rawdb/freezer.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,10 @@ func (f *freezer) validate() error {
break
}
// Now check every table against that length
for k, table := range f.tables {
for kind, table := range f.tables {
items := atomic.LoadUint64(&table.items)
if length != items {
return fmt.Errorf("freezer tables %s and %s have differing lengths: %d != %d", k, name, items, length)
return fmt.Errorf("freezer tables %s and %s have differing lengths: %d != %d", kind, name, items, length)
}
}
atomic.StoreUint64(&f.frozen, length)
Expand Down