Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 committed Nov 17, 2024
1 parent 0df778d commit d75f090
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cl/phase1/forkchoice/fork_graph/fork_graph_disk_fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"fmt"
"io"
"os"
"time"

"github.com/golang/snappy"
"github.com/spf13/afero"
Expand Down Expand Up @@ -161,10 +162,11 @@ func (f *forkGraphDisk) DumpBeaconStateOnDisk(blockRoot libcommon.Hash, bs *stat
log.Error("failed to encode caches", "err", err)
return err
}

a := time.Now()
if err = cacheFile.Sync(); err != nil {
return err
}
log.Debug("sync cache file", "time", time.Since(a))

return
}

0 comments on commit d75f090

Please sign in to comment.