mirror of
https://github.com/ACINQ/eclair.git
synced 2025-02-22 06:21:42 +01:00
Fix TLV tag number in exception (#2212)
This commit is contained in:
parent
5af042a56a
commit
fd84909585
1 changed files with 2 additions and 2 deletions
|
@ -94,7 +94,7 @@ object MessageOnionCodecs {
|
|||
val perHopPayloadCodec: Codec[TlvStream[OnionMessagePayloadTlv]] = TlvCodecs.lengthPrefixedTlvStream[OnionMessagePayloadTlv](onionTlvCodec).complete
|
||||
|
||||
val relayPerHopPayloadCodec: Codec[RelayPayload] = perHopPayloadCodec.narrow({
|
||||
case tlvs if tlvs.get[EncryptedData].isEmpty => Attempt.failure(MissingRequiredTlv(UInt64(10)))
|
||||
case tlvs if tlvs.get[EncryptedData].isEmpty => Attempt.failure(MissingRequiredTlv(UInt64(4)))
|
||||
case tlvs if tlvs.get[ReplyPath].nonEmpty => Attempt.failure(ForbiddenTlv(UInt64(2)))
|
||||
case tlvs => Attempt.successful(RelayPayload(tlvs))
|
||||
}, {
|
||||
|
@ -102,7 +102,7 @@ object MessageOnionCodecs {
|
|||
})
|
||||
|
||||
val finalPerHopPayloadCodec: Codec[FinalPayload] = perHopPayloadCodec.narrow({
|
||||
case tlvs if tlvs.get[EncryptedData].isEmpty => Attempt.failure(MissingRequiredTlv(UInt64(10)))
|
||||
case tlvs if tlvs.get[EncryptedData].isEmpty => Attempt.failure(MissingRequiredTlv(UInt64(4)))
|
||||
case tlvs => Attempt.successful(FinalPayload(tlvs))
|
||||
}, {
|
||||
case FinalPayload(tlvs) => tlvs
|
||||
|
|
Loading…
Add table
Reference in a new issue