diff --git a/src/apps/relay/cmd_relay.cpp b/src/apps/relay/cmd_relay.cpp index dc69215..03da21f 100644 --- a/src/apps/relay/cmd_relay.cpp +++ b/src/apps/relay/cmd_relay.cpp @@ -14,6 +14,10 @@ static void checkConfig() { LW << "Your relay.info.pubkey is incorrectly formatted. It should be 64 hex digits."; } } + + if (cfg().events__rejectEphemeralEventsOlderThanSeconds >= cfg().events__ephemeralEventsLifetimeSeconds) { + LW << "rejectEphemeralEventsOlderThanSeconds is >= ephemeralEventsLifetimeSeconds, which could result in unnecessary disk activity"; + } } diff --git a/src/events.cpp b/src/events.cpp index 3b209ff..e4a2a35 100644 --- a/src/events.cpp +++ b/src/events.cpp @@ -149,7 +149,7 @@ void verifyEventTimestamp(const NostrIndex::Event *flat) { if (ts < earliest) throw herr("created_at too early"); if (ts > latest) throw herr("created_at too late"); - if (flat->expiration() != 0 && flat->expiration() <= now) throw herr("event expired"); + if (flat->expiration() > 1 && flat->expiration() <= now) throw herr("event expired"); } void parseAndVerifyEvent(const tao::json::value &origJson, secp256k1_context *secpCtx, bool verifyMsg, bool verifyTime, std::string &flatStr, std::string &jsonStr) {