@@ -192,11 +192,15 @@ func Execute(options Options) {
192
192
nodeOpts = append (nodeOpts , node .WithWakuFilter (! options .Filter .DisableFullNode , filter .WithTimeout (time .Duration (options .Filter .Timeout )* time .Second )))
193
193
}
194
194
195
- if options .Store .Enable && options .Store .PersistMessages {
196
- nodeOpts = append (nodeOpts , node .WithWakuStoreAndRetentionPolicy (options .Store .ShouldResume , options .Store .RetentionMaxDaysDuration (), options .Store .RetentionMaxMessages ))
197
- dbStore , err := persistence .NewDBStore (logger , persistence .WithDB (db ), persistence .WithRetentionPolicy (options .Store .RetentionMaxMessages , options .Store .RetentionMaxDaysDuration ()))
198
- failOnErr (err , "DBStore" )
199
- nodeOpts = append (nodeOpts , node .WithMessageProvider (dbStore ))
195
+ if options .Store .Enable {
196
+ if options .Store .PersistMessages {
197
+ nodeOpts = append (nodeOpts , node .WithWakuStoreAndRetentionPolicy (options .Store .ShouldResume , options .Store .RetentionMaxDaysDuration (), options .Store .RetentionMaxMessages ))
198
+ dbStore , err := persistence .NewDBStore (logger , persistence .WithDB (db ), persistence .WithRetentionPolicy (options .Store .RetentionMaxMessages , options .Store .RetentionMaxDaysDuration ()))
199
+ failOnErr (err , "DBStore" )
200
+ nodeOpts = append (nodeOpts , node .WithMessageProvider (dbStore ))
201
+ } else {
202
+ nodeOpts = append (nodeOpts , node .WithWakuStore (false , false ))
203
+ }
200
204
}
201
205
202
206
if options .LightPush .Enable {
0 commit comments