Batch insert entries in nostr size test

This commit is contained in:
thePR0M3TH3AN
2025-07-02 15:01:44 -04:00
parent 205c1d3392
commit d8585bf4ef

View File

@@ -41,10 +41,12 @@ def test_nostr_index_size_limits():
delay = float(os.getenv("NOSTR_TEST_DELAY", "5"))
size = 16
batch = 100
entry_count = 0
max_payload = 60 * 1024
try:
while True:
for _ in range(batch):
entry_mgr.add_entry(
website_name=f"site-{entry_count + 1}",
length=12,
@@ -52,6 +54,7 @@ def test_nostr_index_size_limits():
url="https://example.com/" + "a" * size,
)
entry_count += 1
encrypted = vault.get_encrypted_index()
payload_size = len(encrypted) if encrypted else 0
published = client.publish_json_to_nostr(encrypted or b"")