getPubkeysBySearch: reduce limit of second query if applicable

This commit is contained in:
Alex Gleason 2025-02-12 14:47:20 -06:00
parent 379953a8cb
commit 5969d9b3fa
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -31,7 +31,7 @@ export async function getPubkeysBySearch(
return pubkeys;
}
for (const { pubkey } of await query.execute()) {
for (const { pubkey } of await query.limit(limit - pubkeys.size).execute()) {
pubkeys.add(pubkey);
}