Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Comment on lines +213 to +216
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// - 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
// - 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

I know the primary consumer of this is for config file docs and that there's already precedent in there of lists starting at the front, but I wonder if we shouldn't be adapting in here now to the 1.19 godoc rules for properly rendering lists? It'll show up nicely on godocs and also looks a bit clearer in text IMO.

take it or leave it

BitswapPeerID string
}

type FeeConfig struct {
Expand Down