1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-23 14:40:34 +01:00

using 2 bytes to code message type

This commit is contained in:
pm47 2016-12-05 11:59:55 +01:00
parent e182afd6b7
commit ed56401333

View file

@ -113,19 +113,19 @@ object Codecs {
("htlcTimeoutSignature" | listofbinarydata(64)) ("htlcTimeoutSignature" | listofbinarydata(64))
).as[RevokeAndAck] ).as[RevokeAndAck]
val lightningMessageCodec = discriminated[LightningMessage].by(uint32) val lightningMessageCodec = discriminated[LightningMessage].by(uint16)
.typecase(32L, openChannelCodec) .typecase(32, openChannelCodec)
.typecase(33L, acceptChannelCodec) .typecase(33, acceptChannelCodec)
.typecase(34L, fundingCreatedCodec) .typecase(34, fundingCreatedCodec)
.typecase(35L, fundingSignedCodec) .typecase(35, fundingSignedCodec)
.typecase(36L, fundingLockedCodec) .typecase(36, fundingLockedCodec)
.typecase(37L, updateFeeCodec) .typecase(37, updateFeeCodec)
.typecase(38L, shutdownCodec) .typecase(38, shutdownCodec)
.typecase(39L, closingSignedCodec) .typecase(39, closingSignedCodec)
.typecase(128L, addHtlcCodec) .typecase(128, addHtlcCodec)
.typecase(130L, updateFulfillHtlcCodec) .typecase(130, updateFulfillHtlcCodec)
.typecase(131L, updateFailHtlcCodec) .typecase(131, updateFailHtlcCodec)
.typecase(132L, commitSigCodec) .typecase(132, commitSigCodec)
.typecase(133L, revokeAndAckCodec) .typecase(133, revokeAndAckCodec)
} }