mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-07 00:13:06 +00:00
postgres_driver limit max num hashes to 100 (#2976)
This commit is contained in:
parent
d24b56b90a
commit
b8550c5550
@ -815,6 +815,10 @@ method getMessages*(
|
|||||||
): Future[ArchiveDriverResult[seq[ArchiveRow]]] {.async.} =
|
): Future[ArchiveDriverResult[seq[ArchiveRow]]] {.async.} =
|
||||||
debug "beginning of getMessages"
|
debug "beginning of getMessages"
|
||||||
|
|
||||||
|
const MAX_ALLOWED_HASHES = 100
|
||||||
|
if hashes.len > MAX_ALLOWED_HASHES:
|
||||||
|
return err(fmt"can not attend queries with more than {MAX_ALLOWED_HASHES} hashes")
|
||||||
|
|
||||||
let hexHashes = hashes.mapIt(toHex(it))
|
let hexHashes = hashes.mapIt(toHex(it))
|
||||||
|
|
||||||
if cursor.isNone() and pubsubTopic.isNone() and contentTopics.len == 0 and
|
if cursor.isNone() and pubsubTopic.isNone() and contentTopics.len == 0 and
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user