mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-06-30 04:40:36 +02:00
also remove main relays after send
This commit is contained in:
@ -251,6 +251,11 @@ async def send_event_outbox(event: Event, client, dvm_config) -> EventId:
|
|||||||
try:
|
try:
|
||||||
await outboxclient.connect()
|
await outboxclient.connect()
|
||||||
event_id = await outboxclient.send_event(event)
|
event_id = await outboxclient.send_event(event)
|
||||||
|
for relay in relays:
|
||||||
|
try:
|
||||||
|
await outboxclient.force_remove_relay(relay)
|
||||||
|
except:
|
||||||
|
print("Error removing relay: " + relay)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Love yourself then.
|
# Love yourself then.
|
||||||
event_id = None
|
event_id = None
|
||||||
|
@ -65,6 +65,7 @@ AVOID_OUTBOX_RELAY_LIST = ["wss://nos.lol",
|
|||||||
"wss://momostr.pink", "wss://nostr.bitcoinlighthouse.de", "wss://140.f7z.io",
|
"wss://momostr.pink", "wss://nostr.bitcoinlighthouse.de", "wss://140.f7z.io",
|
||||||
"wss://relay.nostrcheck.me", "wss://relay.mostr.pub", "wss://purplepag.es",
|
"wss://relay.nostrcheck.me", "wss://relay.mostr.pub", "wss://purplepag.es",
|
||||||
"wss://nostr.bitcoiner.social", "wss://relay.galtsgulch.cc",
|
"wss://nostr.bitcoiner.social", "wss://relay.galtsgulch.cc",
|
||||||
"ws://oxtrdevav64z64yb7x6rjg4ntzqjhedm5b5zjqulugknhzr46ny2qbad.onion"
|
"ws://oxtrdevav64z64yb7x6rjg4ntzqjhedm5b5zjqulugknhzr46ny2qbad.onion",
|
||||||
|
"wss://relay.f7z.io"
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -104,7 +104,7 @@ def playground(announce=False):
|
|||||||
keys = Keys.parse(sk.to_hex())
|
keys = Keys.parse(sk.to_hex())
|
||||||
relaylimits = RelayLimits.disable()
|
relaylimits = RelayLimits.disable()
|
||||||
|
|
||||||
opts = (Options().relay_limits(relaylimits))
|
opts = Options().relay_limits(relaylimits)
|
||||||
|
|
||||||
cli = Client.with_opts(keys, opts)
|
cli = Client.with_opts(keys, opts)
|
||||||
for relay in dvm.dvm_config.RELAY_LIST:
|
for relay in dvm.dvm_config.RELAY_LIST:
|
||||||
|
Reference in New Issue
Block a user