Skip to content

Commit

Permalink
fix: use neighborhood suggester only on mainnet (#4612)
Browse files Browse the repository at this point in the history
  • Loading branch information
acha-bill authored Mar 14, 2024
1 parent c6ce523 commit 630b9b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/bee/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ func buildBeeNode(ctx context.Context, c *command, cmd *cobra.Command, logger lo
blockchainRpcEndpoint = swapEndpoint
}

var neighborhoodSuggester string
if networkID == chaincfg.Mainnet.NetworkID {
neighborhoodSuggester = c.config.GetString(optionNameNeighborhoodSuggester)
}

b, err := node.NewBee(ctx, c.config.GetString(optionNameP2PAddr), signerConfig.publicKey, signerConfig.signer, networkID, logger, signerConfig.libp2pPrivateKey, signerConfig.pssPrivateKey, &node.Options{
DataDir: c.config.GetString(optionNameDataDir),
CacheCapacity: c.config.GetUint64(optionNameCacheCapacity),
Expand Down Expand Up @@ -339,7 +344,7 @@ func buildBeeNode(ctx context.Context, c *command, cmd *cobra.Command, logger lo
EnableStorageIncentives: c.config.GetBool(optionNameStorageIncentivesEnable),
StatestoreCacheCapacity: c.config.GetUint64(optionNameStateStoreCacheCapacity),
TargetNeighborhood: c.config.GetString(optionNameTargetNeighborhood),
NeighborhoodSuggester: c.config.GetString(optionNameNeighborhoodSuggester),
NeighborhoodSuggester: neighborhoodSuggester,
})

return b, err
Expand Down

0 comments on commit 630b9b1

Please sign in to comment.