Fix tests, circle and make ux nicer
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
d53e43c24d
commit
92e7b4afbf
@ -116,7 +116,7 @@ jobs:
|
||||
- go/mod-download
|
||||
- restore_cache:
|
||||
name: restore go mod cache
|
||||
key: v1-go-deps-{{ arch }}-{{ checksum "~/go/src/github.com/filecoin-project/lotus/go.mod" }}
|
||||
key: v1-go-deps-{{ arch }}-{{ checksum "/home/circleci/project/go.mod" }}
|
||||
- run:
|
||||
command: make deps lotus
|
||||
no_output_timeout: 30m
|
||||
@ -148,7 +148,7 @@ jobs:
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
- save_cache:
|
||||
name: save go mod cache
|
||||
key: v1-go-deps-{{ arch }}-{{ checksum "~/go/src/github.com/filecoin-project/lotus/go.mod" }}
|
||||
key: v1-go-deps-{{ arch }}-{{ checksum "/home/circleci/project/go.mod" }}
|
||||
paths:
|
||||
- "~/go/pkg"
|
||||
- "~/go/src/github.com"
|
||||
|
@ -69,7 +69,7 @@ var preSealCmd = &cli.Command{
|
||||
&cli.Uint64Flag{
|
||||
Name: "sector-offset",
|
||||
Value: 0,
|
||||
Usage: "select number of sectors to pre-seal",
|
||||
Usage: "how many sector ids to skip when starting to seal",
|
||||
},
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
|
@ -30,7 +30,7 @@ func PreSeal(maddr address.Address, ssize uint64, offset uint64, sectors int, sb
|
||||
cfg := §orbuilder.Config{
|
||||
Miner: maddr,
|
||||
SectorSize: ssize,
|
||||
OverrideLastID: offset,
|
||||
FallbackLastID: offset,
|
||||
CacheDir: filepath.Join(sbroot, "cache"),
|
||||
SealedDir: filepath.Join(sbroot, "sealed"),
|
||||
StagedDir: filepath.Join(sbroot, "staging"),
|
||||
|
@ -120,7 +120,7 @@ type Config struct {
|
||||
Miner address.Address
|
||||
|
||||
WorkerThreads uint8
|
||||
OverrideLastID uint64
|
||||
FallbackLastID uint64
|
||||
|
||||
CacheDir string
|
||||
SealedDir string
|
||||
@ -144,21 +144,18 @@ func New(cfg *Config, ds dtypes.MetadataDS) (*SectorBuilder, error) {
|
||||
}
|
||||
|
||||
var lastUsedID uint64
|
||||
if cfg.OverrideLastID != 0 {
|
||||
lastUsedID = cfg.OverrideLastID
|
||||
} else {
|
||||
b, err := ds.Get(lastSectorIdKey)
|
||||
switch err {
|
||||
case nil:
|
||||
i, err := strconv.ParseInt(string(b), 10, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
lastUsedID = uint64(i)
|
||||
case datastore.ErrNotFound:
|
||||
default:
|
||||
b, err := ds.Get(lastSectorIdKey)
|
||||
switch err {
|
||||
case nil:
|
||||
i, err := strconv.ParseInt(string(b), 10, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
lastUsedID = uint64(i)
|
||||
case datastore.ErrNotFound:
|
||||
lastUsedID = cfg.FallbackLastID
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rlimit := cfg.WorkerThreads - PoStReservedWorkers
|
||||
|
@ -163,7 +163,7 @@ func builder(t *testing.T, nFull int, storage []int) ([]test.TestNode, []test.Te
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
genm, err := seed.PreSeal(maddr, 1024, 1, 0, tdir, []byte("make genesis mem random"))
|
||||
genm, err := seed.PreSeal(maddr, 1024, 0, 1, tdir, []byte("make genesis mem random"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user