-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
piece doctor and sector state manager refactor (#1463)
* fix timer.Reset and improve logs * revert randomization * piece doc: handle errors * adjust piece check * refactor unsealsectormanager * refactor piece doctor * add random ports * ignore tests * add version to boostd-data * fix ctx in Start * fix: add reader mock to fix tests * fix: pass new piece directory to provider on test restart * fix synchronisation * note that panics are not propagated in tests * carv1 panics piece directory * print panics * fix: use reader that supports Seek in piece reader mock * fix: reset mock car reader on each invocation * fix: TestOfflineDealDataCleanup * add check for nil cancel func * bump min check period for LevelDB to 5 minutes * check if sector state mgr is initialised * debug line for unflagging * commenting out TestMultipleDealsConcurrent -- flaky test -- works locally * add SectorStateUpdates pubsub * add close for pubsub * add mock sectorstatemgr * add wrapper tests * fixup * cleanup * cleanup * better names * t.Skip for test * remove TODO above println for panic * add unit tests for refreshState * rename tests * more cases * more tests * update description * better comment * better names and comments --------- Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>
- Loading branch information
Showing
31 changed files
with
1,420 additions
and
1,013 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package build | ||
|
||
var CurrentCommit string | ||
|
||
const BuildVersion = "1.4.0" | ||
|
||
func UserVersion() string { | ||
return BuildVersion + CurrentCommit | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package clientutil | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/filecoin-project/boostd-data/client" | ||
"github.com/filecoin-project/boostd-data/svc" | ||
) | ||
|
||
func NewTestStore(ctx context.Context) *client.Store { | ||
bdsvc, err := svc.NewLevelDB("") | ||
if err != nil { | ||
panic(err) | ||
} | ||
ln, err := bdsvc.Start(ctx, "localhost:0") | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
cl := client.NewStore() | ||
err = cl.Dial(ctx, fmt.Sprintf("ws://%s", ln.String())) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
return cl | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.