Class UpdateFailHtlcPayload
- Namespace
- NLightning.Bolts.BOLT2.Payloads
- Assembly
- NLightning.Bolts.dll
Represents the payload for the update_fail_htlc message.
public class UpdateFailHtlcPayload : IMessagePayload
- Inheritance
-
UpdateFailHtlcPayload
- Implements
- Inherited Members
Remarks
Initializes a new instance of the UpdateFailHtlcPayload class.
Constructors
UpdateFailHtlcPayload(ChannelId, ulong, ReadOnlyMemory<byte>)
Represents the payload for the update_fail_htlc message.
public UpdateFailHtlcPayload(ChannelId channelId, ulong id, ReadOnlyMemory<byte> reason)
Parameters
channelId
ChannelIdid
ulongreason
ReadOnlyMemory<byte>
Remarks
Initializes a new instance of the UpdateFailHtlcPayload class.
Properties
ChannelId
The channel_id this message refers to
public ChannelId ChannelId { get; }
Property Value
Id
The htlc id
public ulong Id { get; }
Property Value
Len
The length of the reason
public ushort Len { get; }
Property Value
Reason
The reason for failure
public ReadOnlyMemory<byte> Reason { get; }
Property Value
Methods
DeserializeAsync(Stream)
Deserializes the payload from a stream.
public static Task<UpdateFailHtlcPayload> DeserializeAsync(Stream stream)
Parameters
stream
StreamThe stream to deserialize from.
Returns
- Task<UpdateFailHtlcPayload>
The deserialized payload.
Exceptions
- PayloadSerializationException
Error deserializing Payload
SerializeAsync(Stream)
Serializes the message payload to a stream.
public Task SerializeAsync(Stream stream)
Parameters
stream
StreamThe stream to serialize to.
Returns
- Task
A task that represents the asynchronous operation.