Skip to content

Commit

Permalink
refactor(booster-bitswap): minor UI fixes for booster-bitswap UI
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahhoward committed Sep 26, 2022
1 parent a58ea5a commit 8eaffed
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/booster-bitswap/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

func configureRepo(ctx context.Context, cfgDir string, createIfNotExist bool) (peer.ID, crypto.PrivKey, error) {
if cfgDir == "" {
return "", nil, fmt.Errorf("dataDir must be set")
return "", nil, fmt.Errorf("%s is a required flag", FlagRepo.Name)
}

if err := os.MkdirAll(cfgDir, 0744); err != nil {
Expand Down Expand Up @@ -70,7 +70,7 @@ func loadPeerKey(cfgDir string, createIfNotExists bool) (crypto.PrivKey, error)
return nil, err
}
if os.IsNotExist(err) && !createIfNotExists {
return nil, err
return nil, fmt.Errorf("booster-bitswap has not been initialized. Run the booster-bitswap init command")
}
log.Infof("Generating new peer key...")

Expand Down
8 changes: 7 additions & 1 deletion node/config/doc_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion node/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,14 @@ type DealmakingConfig struct {
// another concurrent download is allowed to start).
HttpTransferStallTimeout Duration

BitswapPeerID string
// The peed id used by booster-bitswap. To set, copy the value
// printed by running 'booster-bitswap init'. If this value is set,
// Boost will:
// - listen on bitswap protocols on its own peer id and forward them
// to booster bitswap
// - advertise bitswap records to the content indexer
// - list bitswap in available transports on the retrieval transport protocol
BitswapPeerID string
}

type FeeConfig struct {
Expand Down

0 comments on commit 8eaffed

Please sign in to comment.