Skip to content

Commit

Permalink
Protocol Proxy cleanup (#836)
Browse files Browse the repository at this point in the history
* refactor(booster-bitswap): minor UI fixes for booster-bitswap UI

* Update cmd/booster-bitswap/init.go

Co-authored-by: dirkmc <[email protected]>

Co-authored-by: dirkmc <[email protected]>
  • Loading branch information
hannahhoward and dirkmc authored Sep 27, 2022
1 parent 0e75016 commit 957e65d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
6 changes: 3 additions & 3 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 @@ -69,8 +69,8 @@ func loadPeerKey(cfgDir string, createIfNotExists bool) (crypto.PrivKey, error)
if !os.IsNotExist(err) {
return nil, err
}
if os.IsNotExist(err) && !createIfNotExists {
return nil, err
if !createIfNotExists {
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 957e65d

Please sign in to comment.