Fix isValidName, decrease wake up pause to 1 sec

This commit is contained in:
artur 2024-02-16 18:57:12 +03:00
parent 3011f3eae5
commit 2a5763b5f1

View File

@ -35,7 +35,7 @@ const port = 8000;
const EMAIL = "artur@nostr.band"; // admin email const EMAIL = "artur@nostr.band"; // admin email
const MAX_RELAYS = 3; // no more than 3 relays monitored per pubkey const MAX_RELAYS = 3; // no more than 3 relays monitored per pubkey
const MAX_BATCH_SIZE = 500; // pubkeys per sub 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_PAUSE = 3600000; // 1 hour
const MAX_DATA = 1 << 10; // 1kb const MAX_DATA = 1 << 10; // 1kb
const POW_PERIOD = 3600000; // 1h const POW_PERIOD = 3600000; // 1h
@ -447,7 +447,7 @@ function digest(algo, data) {
} }
function isValidName(name) { function isValidName(name) {
const REGEX = /^[a-z0-9_]{3,128}$/; const REGEX = /^[a-z0-9_-.]{2,128}$/;
return REGEX.test(name); return REGEX.test(name);
} }