move away from public relays

This commit is contained in:
dbth
2024-12-30 21:54:04 +01:00
parent 1773d67c79
commit 9d24383087
5 changed files with 29 additions and 10 deletions

View File

@@ -1,14 +1,20 @@
from nostr_sdk import Tag, Keys, EventBuilder, Kind
from nostr_dvm.utils.definitions import EventDefinitions
from nostr_dvm.utils.dvmconfig import DVMConfig
from nostr_dvm.utils.nostr_utils import send_event
from nostr_dvm.utils.print_utils import bcolors
async def announce_dm_relays(dvm_config, client):
tags = []
relays_to_publish = DVMConfig.RELAY_LIST
for relay in dvm_config.RELAY_LIST:
if relay not in relays_to_publish:
relays_to_publish.append(relay)
for relay in relays_to_publish:
r_tag = Tag.parse(["r", relay])
tags.append(r_tag)
@@ -32,7 +38,14 @@ async def nip65_announce_relays(dvm_config, client):
tags = []
relays_to_publish = DVMConfig.RELAY_LIST
for relay in dvm_config.RELAY_LIST:
if relay not in relays_to_publish:
relays_to_publish.append(relay)
for relay in relays_to_publish:
r_tag = Tag.parse(["r", relay])
tags.append(r_tag)