From 2a5763b5f14b4d79dd252cabd78b404ac95f962a Mon Sep 17 00:00:00 2001 From: artur Date: Fri, 16 Feb 2024 18:57:12 +0300 Subject: [PATCH] Fix isValidName, decrease wake up pause to 1 sec --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 8ffdd8b..ff960aa 100644 --- a/src/index.js +++ b/src/index.js @@ -35,7 +35,7 @@ const port = 8000; const EMAIL = "artur@nostr.band"; // admin email const MAX_RELAYS = 3; // no more than 3 relays monitored per pubkey const MAX_BATCH_SIZE = 500; // pubkeys per sub -const MIN_PAUSE = 5000; // 5 ms +const MIN_PAUSE = 1000; // 1 sec const MAX_PAUSE = 3600000; // 1 hour const MAX_DATA = 1 << 10; // 1kb const POW_PERIOD = 3600000; // 1h @@ -447,7 +447,7 @@ function digest(algo, data) { } function isValidName(name) { - const REGEX = /^[a-z0-9_]{3,128}$/; + const REGEX = /^[a-z0-9_-.]{2,128}$/; return REGEX.test(name); }