mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-03-27 06:43:39 +00:00
fix: disable repair if not part of retrieval strategy
This commit is contained in:
parent
6a5eac2a85
commit
860ecfaca7
@ -292,7 +292,15 @@ export class ReliableChannel<
|
||||
decoder: IDecoder<T>,
|
||||
options?: ReliableChannelOptions
|
||||
): Promise<ReliableChannel<T>> {
|
||||
const sdsMessageChannel = new MessageChannel(channelId, senderId, options);
|
||||
// Enable SDS-R repair only if retrieval strategy uses it
|
||||
const retrievalStrategy = options?.retrievalStrategy ?? "both";
|
||||
const enableRepair =
|
||||
retrievalStrategy === "both" || retrievalStrategy === "sds-r-only";
|
||||
|
||||
const sdsMessageChannel = new MessageChannel(channelId, senderId, {
|
||||
...options,
|
||||
enableRepair
|
||||
});
|
||||
const messageChannel = new ReliableChannel(
|
||||
node,
|
||||
sdsMessageChannel,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user