mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-08-25 10:31:13 +00:00
Enables perssist-message flag in the store protocol for wakunode2 (#519)
* enables perssistmessage flag * disables in memory storage when persist-messages is false * adds the persistMessages input to the mountStore * defaults the store flag to true * adds the missing argument * persists messages in memory conditioned to the persistMessages flag * adds persistmessages flag to the config_bridge * defaults persistmessages to true * defaults the store flag to true and persist-messages to false * updates store.md * updates chat2 instructions about --store flag * removes --store flag from chat2 command execution Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
This commit is contained in:
co-authored by
Oskar Thorén
parent
7b6d93d13b
commit
c0d858af1d
@@ -44,10 +44,10 @@ The `chat2` application can retrieve historical chat messages from a node suppor
|
||||
./build/chat2 --storenode:/ip4/134.209.139.210/tcp/30303/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ
|
||||
```
|
||||
|
||||
Alternatively, the `chat2` application will select a random `storenode` for you from the test fleet if the `store` option is set to `true` and `storenode` left unspecified.
|
||||
Alternatively, the `chat2` application will select a random `storenode` for you from the test fleet if `storenode` left unspecified.
|
||||
|
||||
```
|
||||
./build/chat2 --store:true
|
||||
./build/chat2
|
||||
```
|
||||
|
||||
> *NOTE: Currently (Mar 3, 2021) the only node in the test fleet that provides reliable store functionality is `/ip4/134.209.139.210/tcp/30303/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ`. We're working on fixing this.*
|
||||
|
||||
@@ -20,8 +20,11 @@ Run two nodes and connect them:
|
||||
./build/wakunode2 --ports-shift:1 --staticnode:/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmF4tuht6fmna6uDqoSMgFqhUrdaVR6VQRyGr6sCpfS2jp --storenode:/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmF4tuht6fmna6uDqoSMgFqhUrdaVR6VQRyGr6sCpfS2jp
|
||||
```
|
||||
|
||||
When passing the flag `dbpath` with a path, messages are persisted and stored in a database called `store` under the specified path.
|
||||
When none is passed, messages are not persisted and are only stored in-memory.
|
||||
When flag `persist-messages` is passed messages are going to be persisted in-memory.
|
||||
If additionally flag `dbpath` is passed with a path, messages are persisted and stored in a database called `store` under the specified path.
|
||||
If flag `persist-messages` is not passed, messages are not persisted and stored at all.
|
||||
|
||||
|
||||
|
||||
You should see your nodes connecting.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user