chore(waku2): disable light client on status.prod
This commit is contained in:
parent
2166786b0e
commit
23d45d8707
|
@ -305,7 +305,7 @@ func (b *StatusNode) wakuV2Service(nodeConfig *params.NodeConfig) (*wakuv2.Waku,
|
|||
}
|
||||
logging.SetAllLoggers(lvl)
|
||||
|
||||
w, err := wakuv2.New(nodeConfig.NodeKey, cfg, logutils.ZapLogger(), b.appDB)
|
||||
w, err := wakuv2.New(nodeConfig.NodeKey, nodeConfig.ClusterConfig.Fleet, cfg, logutils.ZapLogger(), b.appDB)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -27,7 +27,7 @@ import (
|
|||
)
|
||||
|
||||
func TestMultipleTopicCopyInNewMessageFilter(t *testing.T) {
|
||||
w, err := New("", nil, nil, nil)
|
||||
w, err := New("", "", nil, nil, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("Error creating WakuV2 client: %v", err)
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ type Waku struct {
|
|||
}
|
||||
|
||||
// New creates a WakuV2 client ready to communicate through the LibP2P network.
|
||||
func New(nodeKey string, cfg *Config, logger *zap.Logger, appDB *sql.DB) (*Waku, error) {
|
||||
func New(nodeKey string, fleet string, cfg *Config, logger *zap.Logger, appDB *sql.DB) (*Waku, error) {
|
||||
if logger == nil {
|
||||
logger = zap.NewNop()
|
||||
}
|
||||
|
@ -155,6 +155,11 @@ func New(nodeKey string, cfg *Config, logger *zap.Logger, appDB *sql.DB) (*Waku,
|
|||
logger: logger,
|
||||
}
|
||||
|
||||
// Disabling light client mode if using status.prod or undefined
|
||||
if fleet == "status.prod" || fleet == "" {
|
||||
cfg.LightClient = false
|
||||
}
|
||||
|
||||
waku.settings = settings{
|
||||
MaxMsgSize: cfg.MaxMessageSize,
|
||||
LightClient: cfg.LightClient,
|
||||
|
|
Loading…
Reference in New Issue