diff --git a/.env.example b/.env.example index f18144d..ca235d5 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,8 @@ RELAY_URL="wss://wot.utxo.one" # where we should store the database DB_PATH="db" +# what engine to use for the database: lmdb, badger +DB_ENGINE="lmdb" # where we should store the index.html and static files INDEX_PATH="templates/index.html" @@ -14,4 +16,4 @@ STATIC_PATH="templates/static" # relay behavior # how often to refresh the relay's view of the WoT in HOURS -REFRESH_INTERVAL_HOURS=24 \ No newline at end of file +REFRESH_INTERVAL_HOURS=1 \ No newline at end of file diff --git a/README.md b/README.md index c0dfc2e..6be20e5 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ RELAY_DESCRIPTION="Your relay description" DB_PATH="/home/ubuntu/wot-relay/db" # any path you would like the database to be saved. INDEX_PATH="/home/ubuntu/wot-relay/templates/index.html" # path to the index.html file STATIC_PATH="/home/ubuntu/wot-relay/templates/static" # path to the static folder -REFRESH_INTERVAL=24 # interval in hours to refresh the web of trust +REFRESH_INTERVAL_HOURS=24 # interval in hours to refresh the web of trust ``` ### 4. Build the project diff --git a/main.go b/main.go index 93d8bb2..0ff9339 100644 --- a/main.go +++ b/main.go @@ -325,6 +325,7 @@ func archiveTrustedNotes(relay *khatru.Relay, ctx context.Context) { } relay.AddEvent(ctx, ev.Event) + log.Println("📦 archived note from", ev.Event.PubKey) trustedNotes++ } else { untrustedNotes++