-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
162 additions
and
6 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
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,49 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/filecoin-project/boost/node/repo" | ||
lotus_repo "github.com/filecoin-project/lotus/node/repo" | ||
"github.com/mitchellh/go-homedir" | ||
"github.com/urfave/cli/v2" | ||
) | ||
|
||
var removeIPNICmd = &cli.Command{ | ||
Name: "remove-ipni", | ||
Description: "Sends remove ad for all the currently published Ads to IPNI", | ||
Usage: "migrate-curio remove-ipni", | ||
Before: before, | ||
Action: func(cctx *cli.Context) error { | ||
ctx := cctx.Context | ||
|
||
repoDir, err := homedir.Expand(cctx.String(FlagBoostRepo)) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
r, err := lotus_repo.NewFS(repoDir) | ||
if err != nil { | ||
return err | ||
} | ||
ok, err := r.Exists() | ||
if err != nil { | ||
return err | ||
} | ||
if !ok { | ||
return fmt.Errorf("repo at '%s' is not initialized", cctx.String(FlagBoostRepo)) | ||
} | ||
|
||
lr, err := r.Lock(repo.Boost) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
mds, err := lr.Datastore(ctx, "/metadata") | ||
Check failure on line 42 in cmd/migrate-curio/ipni.go GitHub Actions / build-all
Check failure on line 42 in cmd/migrate-curio/ipni.go GitHub Actions / lint
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
return migrate(cctx, repoDir) | ||
}, | ||
} |
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