Remove unused MessagingClient reference from ReliableChannelManager - the new request broker completes the contract just perfect.

This commit is contained in:
NagyZoltanPeter 2026-06-25 07:53:22 +02:00
parent e37e04d5e6
commit 4995b86d13
No known key found for this signature in database
GPG Key ID: 3E1F97CF4A7B6F42
2 changed files with 2 additions and 16 deletions

View File

@ -36,28 +36,14 @@ type
ReliableChannelManager* = ref object of IReliableChannelManager
channels: Table[ChannelId, ReliableChannel]
messagingClient: MessagingClient ## The channel layer chains onto messaging.
brokerCtx: BrokerContext
proc new*(
T: type ReliableChannelManager,
conf: ReliableChannelManagerConf,
messagingClient: MessagingClient,
brokerCtx: BrokerContext = globalBrokerContext(),
): Result[T, string] =
## The reliable channel layer chains onto the messaging layer: its default
## egress is `MessagingClient.send`, wrapped here so callers never wire the
## handler themselves.
if messagingClient.isNil():
return err("messaging client is required")
return ok(
T(
channels: initTable[ChannelId, ReliableChannel](),
messagingClient: messagingClient,
brokerCtx: brokerCtx,
)
)
return ok(T(channels: initTable[ChannelId, ReliableChannel](), brokerCtx: brokerCtx))
proc start*(self: ReliableChannelManager): Result[void, string] =
## Placeholder: per-channel listeners are installed in `ReliableChannel.new`,

View File

@ -70,7 +70,7 @@ proc new*(
return err("failed to create MessagingClient: " & error)
let reliableChannelManager = ReliableChannelManager.new(
layerConf.reliableChannel, messagingClient, waku.brokerCtx
layerConf.reliableChannel, waku.brokerCtx
).valueOr:
return err("failed to create ReliableChannelManager: " & error)