mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-16 04:56:36 +00:00
minor
This commit is contained in:
parent
a5360a97eb
commit
8f42a64920
1 changed files with 5 additions and 7 deletions
|
|
@ -321,13 +321,11 @@ func (t *freezerTable) repair() error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Ensure all reparation changes have been written to disk
|
// Ensure all reparation changes have been written to disk
|
||||||
if !t.readonly {
|
if err := t.index.Sync(); err != nil {
|
||||||
if err := t.index.Sync(); err != nil {
|
return err
|
||||||
return err
|
}
|
||||||
}
|
if err := t.head.Sync(); err != nil {
|
||||||
if err := t.head.Sync(); err != nil {
|
return err
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Update the item and byte counters and return
|
// Update the item and byte counters and return
|
||||||
t.items = uint64(t.itemOffset) + uint64(offsetsSize/indexEntrySize-1) // last indexEntry points to the end of the data file
|
t.items = uint64(t.itemOffset) + uint64(offsetsSize/indexEntrySize-1) // last indexEntry points to the end of the data file
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue