mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-22 12:39:30 +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
24 lines
603 B
Nim
24 lines
603 B
Nim
{.used.}
|
|
|
|
import chronos, chronicles
|
|
|
|
import
|
|
logos_delivery/waku/[node/peer_manager, waku_store, waku_store/client],
|
|
../testlib/[common, wakucore]
|
|
|
|
proc newTestWakuStore*(
|
|
switch: Switch, handler: StoreQueryRequestHandler
|
|
): Future[WakuStore] {.async.} =
|
|
let
|
|
peerManager = PeerManager.new(switch)
|
|
proto = WakuStore.new(peerManager, common.rng(), handler)
|
|
|
|
await proto.start()
|
|
switch.mount(proto)
|
|
|
|
return proto
|
|
|
|
proc newTestWakuStoreClient*(switch: Switch): WakuStoreClient {.gcsafe.} =
|
|
let peerManager = PeerManager.new(switch)
|
|
WakuStoreClient.new(peerManager, common.rng())
|