Skip to content

Commit 6cd6177

Browse files
committed
refactor(booster-bitswap): minor UI fixes for booster-bitswap UI
1 parent a58ea5a commit 6cd6177

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

cmd/booster-bitswap/init.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

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

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

node/config/types.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,14 @@ type DealmakingConfig struct {
207207
// another concurrent download is allowed to start).
208208
HttpTransferStallTimeout Duration
209209

210-
BitswapPeerID string
210+
// The peed id used by booster-bitswap. To set, copy the value
211+
// printed by running `booster-bitswap init`. If this value is set,
212+
// Boost will:
213+
// - listen on bitswap protocols on its own peer id and forward them
214+
// to booster bitswap
215+
// - advertise bitswap records to the content indexer
216+
// - list bitswap in available transports on the retrieval transport protocol
217+
BitswapPeerID string
211218
}
212219

213220
type FeeConfig struct {

0 commit comments

Comments
 (0)