Class ChannelReadyMessageHandler
- Namespace
- NLightning.Application.Channels.Handlers
- Assembly
- NLightning.Application.dll
public class ChannelReadyMessageHandler : IChannelMessageHandler<ChannelReadyMessage>
- Inheritance
-
ChannelReadyMessageHandler
- Implements
- Inherited Members
Constructors
ChannelReadyMessageHandler(IChannelMemoryRepository, ILogger<ChannelReadyMessageHandler>, IUnitOfWork)
public ChannelReadyMessageHandler(IChannelMemoryRepository channelMemoryRepository, ILogger<ChannelReadyMessageHandler> logger, IUnitOfWork unitOfWork)
Parameters
channelMemoryRepository
IChannelMemoryRepositorylogger
ILogger<ChannelReadyMessageHandler>unitOfWork
IUnitOfWork
Methods
HandleAsync(ChannelReadyMessage, ChannelState, FeatureOptions, CompactPubKey)
Handles a channel message and returns a response message if needed
public Task<IChannelMessage?> HandleAsync(ChannelReadyMessage message, ChannelState currentState, FeatureOptions negotiatedFeatures, CompactPubKey peerPubKey)
Parameters
message
ChannelReadyMessageThe message to handle
currentState
ChannelStateThe current state of the channel
negotiatedFeatures
FeatureOptionsFeatures negotiated with the peer
peerPubKey
CompactPubKeyThe public key of the peer
Returns
- Task<IChannelMessage>
A response message if needed, or null if no response is needed