mirror of https://github.com/waku-org/nwaku.git
chore: archive.nim - increase the max limit of content topics per query to 100 (#2846)
This commit is contained in:
parent
99149ea9dc
commit
a05fa06919
|
@ -233,13 +233,13 @@ procSuite "Waku Archive - find messages":
|
|||
response.messages.anyIt(it == msg1)
|
||||
response.messages.anyIt(it == msg3)
|
||||
|
||||
test "handle query with more than 10 content filters":
|
||||
test "handle query with more than 100 content filters":
|
||||
## Setup
|
||||
let
|
||||
driver = newSqliteArchiveDriver()
|
||||
archive = newWakuArchive(driver)
|
||||
|
||||
let queryTopics = toSeq(1 .. 15).mapIt(ContentTopic($it))
|
||||
let queryTopics = toSeq(1 .. 150).mapIt(ContentTopic($it))
|
||||
|
||||
## Given
|
||||
let req = ArchiveQuery(contentTopics: queryTopics)
|
||||
|
|
|
@ -141,7 +141,7 @@ proc findMessages*(
|
|||
|
||||
let isAscendingOrder = query.direction.into()
|
||||
|
||||
if query.contentTopics.len > 10:
|
||||
if query.contentTopics.len > 100:
|
||||
return err(ArchiveError.invalidQuery("too many content topics"))
|
||||
|
||||
if query.cursor.isSome() and query.cursor.get().hash.len != 32:
|
||||
|
@ -229,7 +229,7 @@ proc findMessagesV2*(
|
|||
|
||||
let isAscendingOrder = query.direction.into()
|
||||
|
||||
if query.contentTopics.len > 10:
|
||||
if query.contentTopics.len > 100:
|
||||
return err(ArchiveError.invalidQuery("too many content topics"))
|
||||
|
||||
let queryStartTime = getTime().toUnixFloat()
|
||||
|
|
Loading…
Reference in New Issue