mirror of https://github.com/status-im/go-waku.git
chore: remove `--persist-messages` flag
This commit is contained in:
parent
57a525f71e
commit
b242389e05
8
waku.go
8
waku.go
|
@ -135,12 +135,6 @@ func main() {
|
|||
Usage: "Use SQLiteDB to persist information",
|
||||
Destination: &options.UseDB,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "persist-messages",
|
||||
Usage: "Enable message persistence",
|
||||
Destination: &options.Store.PersistMessages,
|
||||
Value: false,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "persist-peers",
|
||||
Usage: "Enable peer persistence",
|
||||
|
@ -219,7 +213,7 @@ func main() {
|
|||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "store",
|
||||
Usage: "Enable relay protocol",
|
||||
Usage: "Enable store protocol to persist messages",
|
||||
Destination: &options.Store.Enable,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
|
|
15
waku/node.go
15
waku/node.go
|
@ -205,15 +205,12 @@ func Execute(options Options) {
|
|||
nodeOpts = append(nodeOpts, node.WithWakuFilter(!options.Filter.DisableFullNode, filter.WithTimeout(options.Filter.Timeout)))
|
||||
}
|
||||
|
||||
if options.Store.Enable {
|
||||
if options.Store.PersistMessages {
|
||||
nodeOpts = append(nodeOpts, node.WithWakuStore(true, options.Store.ShouldResume))
|
||||
dbStore, err := persistence.NewDBStore(logger, persistence.WithDB(db), persistence.WithRetentionPolicy(options.Store.RetentionMaxMessages, options.Store.RetentionTime))
|
||||
failOnErr(err, "DBStore")
|
||||
nodeOpts = append(nodeOpts, node.WithMessageProvider(dbStore))
|
||||
} else {
|
||||
nodeOpts = append(nodeOpts, node.WithWakuStore(false, false))
|
||||
}
|
||||
nodeOpts = append(nodeOpts, node.WithWakuStore(options.Store.Enable, options.Store.ShouldResume))
|
||||
if options.Store.Enable && options.UseDB {
|
||||
dbStore, err := persistence.NewDBStore(logger, persistence.WithDB(db), persistence.WithRetentionPolicy(options.Store.RetentionMaxMessages, options.Store.RetentionTime))
|
||||
failOnErr(err, "DBStore")
|
||||
nodeOpts = append(nodeOpts, node.WithMessageProvider(dbStore))
|
||||
|
||||
}
|
||||
|
||||
if options.LightPush.Enable {
|
||||
|
|
|
@ -83,7 +83,6 @@ type LightpushOptions struct {
|
|||
// node and provide message history to nodes that ask for it.
|
||||
type StoreOptions struct {
|
||||
Enable bool
|
||||
PersistMessages bool
|
||||
ShouldResume bool
|
||||
RetentionTime time.Duration
|
||||
RetentionMaxMessages int
|
||||
|
|
Loading…
Reference in New Issue