Merge branch 'master' into inmem-journal

This commit is contained in:
Raúl Kripalani
2020-08-26 16:38:23 +01:00
343 changed files with 15949 additions and 6148 deletions
+3 -2
View File
@@ -6,7 +6,6 @@ import (
"os"
"path/filepath"
"sync"
"time"
"golang.org/x/xerrors"
@@ -14,6 +13,8 @@ import (
"github.com/filecoin-project/lotus/node/repo"
)
const RFC3339nocolon = "2006-01-02T150405Z0700"
// fsJournal is a basic journal backed by files on a filesystem.
type fsJournal struct {
EventTypeRegistry
@@ -110,7 +111,7 @@ func (f *fsJournal) rollJournalFile() error {
_ = f.fi.Close()
}
nfi, err := os.Create(filepath.Join(f.dir, fmt.Sprintf("lotus-journal-%s.ndjson", build.Clock.Now().Format(time.RFC3339))))
nfi, err := os.Create(filepath.Join(f.dir, fmt.Sprintf("lotus-journal-%s.ndjson", build.Clock.Now().Format(RFC3339nocolon))))
if err != nil {
return xerrors.Errorf("failed to open journal file: %w", err)
}