mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-19 11:09:26 +00:00
* change all usage of std.options.Option[T] to results.Opt[T] * fix broken apps and examples (to validate refactor) * removed all std/options code added for libp2p v2 migration * add broker Opt codec to persistency/backend_comm.nim * add a readValue overload for Opt[T] in tools/confutils/cli_args.nim * keep Option where required (Presto, confutils' config_file.nim) * Change generateRlnProof error handling * Fix imports
22 lines
685 B
Nim
22 lines
685 B
Nim
import std/[tables, sequtils]
|
|
|
|
import logos_delivery/waku/waku_core/topics, ../testlib/wakucore
|
|
|
|
proc `==`*(
|
|
table: Table[pubsub_topic.RelayShard, seq[NsContentTopic]],
|
|
other: array[0 .. 0, (string, seq[string])],
|
|
): bool =
|
|
let otherTyped = other.map(
|
|
proc(item: (string, seq[string])): (RelayShard, seq[NsContentTopic]) =
|
|
let
|
|
(pubsubTopic, contentTopics) = item
|
|
shard = RelayShard.parse(pubsubTopic).value()
|
|
nsContentTopics = contentTopics.map(
|
|
proc(contentTopic: string): NsContentTopic =
|
|
NsContentTopic.parse(contentTopic).value()
|
|
)
|
|
return (shard, nsContentTopics)
|
|
)
|
|
|
|
table == otherTyped.toTable()
|