mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-04 02:23:48 +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
|
||||
if !t.readonly {
|
||||
if err := t.index.Sync(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := t.head.Sync(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := t.index.Sync(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := t.head.Sync(); err != nil {
|
||||
return err
|
||||
}
|
||||
// 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue