516516 interface IChannelMsg
517517 interface ILightningSerializable< OpenChannelMsg> with
518518 member this.Deserialize ( ls ) =
519- this.Chainhash <- ls.ReadUInt256( false )
519+ this.Chainhash <- ls.ReadUInt256( true )
520520 this.TemporaryChannelId <- ChannelId( ls.ReadUInt256( true ))
521521 this.FundingSatoshis <- Money.Satoshis( ls.ReadUInt64( false ))
522522 this.PushMSat <- LNMoney.MilliSatoshis( ls.ReadUInt64( false ))
538538 if ( ls.Position = ls.Length) then None else
539539 ls.ReadWithLen() |> Script |> Some
540540 member this.Serialize ( ls ) =
541- ls.Write( this.Chainhash, false )
541+ ls.Write( this.Chainhash, true )
542542 ls.Write( this.TemporaryChannelId.Value, true )
543543 ls.Write( this.FundingSatoshis.Satoshi, false )
544544 ls.Write( this.PushMSat.MilliSatoshi, false )
@@ -1111,7 +1111,7 @@ with
11111111 member this.Deserialize ( ls ) =
11121112 this.Features <-
11131113 ls.ReadWithLen() |> FeatureBit.CreateUnsafe
1114- this.ChainHash <- ls.ReadUInt256( false )
1114+ this.ChainHash <- ls.ReadUInt256( true )
11151115 this.ShortChannelId <- ls.ReadUInt64( false ) |> ShortChannelId.FromUInt64
11161116 this.NodeId1 <- ls.ReadPubKey() |> NodeId
11171117 this.NodeId2 <- ls.ReadPubKey() |> NodeId
@@ -1120,7 +1120,7 @@ with
11201120 this.ExcessData <- match ls.TryReadAll() with Some b -> b | None -> [||]
11211121 member this.Serialize ( ls ) =
11221122 ls.WriteWithLen( this.Features.ToByteArray())
1123- ls.Write( this.ChainHash, false )
1123+ ls.Write( this.ChainHash, true )
11241124 ls.Write( this.ShortChannelId)
11251125 ls.Write( this.NodeId1.Value)
11261126 ls.Write( this.NodeId2.Value)
@@ -1169,7 +1169,7 @@ type UnsignedChannelUpdateMsg = {
11691169 interface IRoutingMsg
11701170 interface ILightningSerializable< UnsignedChannelUpdateMsg> with
11711171 member this.Deserialize ( ls : LightningReaderStream ): unit =
1172- this.ChainHash <- ls.ReadUInt256( false )
1172+ this.ChainHash <- ls.ReadUInt256( true )
11731173 this.ShortChannelId <- ls.ReadUInt64( false ) |> ShortChannelId.FromUInt64
11741174 this.Timestamp <- ls.ReadUInt32( false )
11751175 this.MessageFlags <- ls.ReadByte()
@@ -1184,7 +1184,7 @@ type UnsignedChannelUpdateMsg = {
11841184 else
11851185 None
11861186 member this.Serialize ( ls : LightningWriterStream ): unit =
1187- ls.Write( this.ChainHash, false )
1187+ ls.Write( this.ChainHash, true )
11881188 ls.Write( this.ShortChannelId)
11891189 ls.Write( this.Timestamp, false )
11901190 ls.Write( this.MessageFlags)
@@ -1441,7 +1441,7 @@ type QueryShortChannelIdsMsg = {
14411441 interface IQueryMsg
14421442 interface ILightningSerializable< QueryShortChannelIdsMsg> with
14431443 member this.Deserialize ( ls : LightningReaderStream ) =
1444- this.ChainHash <- ls.ReadUInt256( false )
1444+ this.ChainHash <- ls.ReadUInt256( true )
14451445 let shortIdsWithFlag = ls.ReadWithLen()
14461446 this.ShortIdsEncodingType <- LanguagePrimitives.EnumOfValue< byte, EncodingType>( shortIdsWithFlag.[ 0 ])
14471447 let shortIds =
@@ -1463,7 +1463,7 @@ type QueryShortChannelIdsMsg = {
14631463 this.ShortIds <- shortIds
14641464 this.TLVs <- tlvs
14651465 member this.Serialize ( ls ) =
1466- ls.Write( this.ChainHash, false )
1466+ ls.Write( this.ChainHash, true )
14671467 let encodedIds = this.ShortIds |> Encoder.encodeShortChannelIds ( this.ShortIdsEncodingType)
14681468 [[|( byte) this.ShortIdsEncodingType|]; encodedIds]
14691469 |> Array.concat
@@ -1479,14 +1479,14 @@ type ReplyShortChannelIdsEndMsg = {
14791479 interface IQueryMsg
14801480 interface ILightningSerializable< ReplyShortChannelIdsEndMsg> with
14811481 member this.Deserialize ( ls ) =
1482- this.ChainHash <- ls.ReadUInt256( false )
1482+ this.ChainHash <- ls.ReadUInt256( true )
14831483 this.Complete <-
14841484 let b = ls.ReadByte()
14851485 if ( b = 0 uy) then false else
14861486 if ( b = 1 uy) then true else
14871487 raise <| FormatException( sprintf " reply_short_channel_ids has unknown byte in `complete` field %A " b)
14881488 member this.Serialize ( ls ) =
1489- ls.Write( this.ChainHash, false )
1489+ ls.Write( this.ChainHash, true )
14901490 ls.Write( if ( this.Complete) then 1 uy else 0 uy)
14911491[<CLIMutable>]
14921492type QueryChannelRangeMsg = {
@@ -1499,15 +1499,15 @@ type QueryChannelRangeMsg = {
14991499 interface IQueryMsg
15001500 interface ILightningSerializable< QueryChannelRangeMsg> with
15011501 member this.Deserialize ( ls ) =
1502- this.ChainHash <- ls.ReadUInt256( false )
1502+ this.ChainHash <- ls.ReadUInt256( true )
15031503 this.FirstBlockNum <- ls.ReadUInt32( false ) |> BlockHeight
15041504 this.NumberOfBlocks <- ls.ReadUInt32( false )
15051505 this.TLVs <-
15061506 let r = ls.ReadTLVStream()
15071507 r
15081508 |> Array.map( QueryChannelRangeTLV.FromGenericTLV)
15091509 member this.Serialize ( ls ) =
1510- ls.Write( this.ChainHash, false )
1510+ ls.Write( this.ChainHash, true )
15111511 ls.Write( this.FirstBlockNum.Value, false )
15121512 ls.Write( this.NumberOfBlocks, false )
15131513 this.TLVs |> Array.map( fun tlv -> tlv.ToGenericTLV()) |> ls.WriteTLVStream
@@ -1526,7 +1526,7 @@ type ReplyChannelRangeMsg = {
15261526 interface IQueryMsg
15271527 interface ILightningSerializable< ReplyChannelRangeMsg> with
15281528 member this.Deserialize ( ls ) =
1529- this.ChainHash <- ls.ReadUInt256( false )
1529+ this.ChainHash <- ls.ReadUInt256( true )
15301530 this.FirstBlockNum <- ls.ReadUInt32( false ) |> BlockHeight
15311531 this.NumOfBlocks <- ls.ReadUInt32( false )
15321532 this.Complete <-
@@ -1541,7 +1541,7 @@ type ReplyChannelRangeMsg = {
15411541 this.TLVs <-
15421542 ls.ReadTLVStream() |> Array.map( ReplyChannelRangeTLV.FromGenericTLV)
15431543 member this.Serialize ( ls ) =
1544- ls.Write( this.ChainHash, false )
1544+ ls.Write( this.ChainHash, true )
15451545 ls.Write( this.FirstBlockNum.Value, false )
15461546 ls.Write( this.NumOfBlocks, false )
15471547 ls.Write( if this.Complete then 1 uy else 0 uy)
@@ -1561,11 +1561,11 @@ type GossipTimestampFilterMsg = {
15611561 interface IQueryMsg
15621562 interface ILightningSerializable< GossipTimestampFilterMsg> with
15631563 member this.Deserialize ( ls ) =
1564- this.ChainHash <- ls.ReadUInt256( false )
1564+ this.ChainHash <- ls.ReadUInt256( true )
15651565 this.FirstTimestamp <- ls.ReadUInt32( false )
15661566 this.TimestampRange <- ls.ReadUInt32( false )
15671567 member this.Serialize ( ls ) =
1568- ls.Write( this.ChainHash, false )
1568+ ls.Write( this.ChainHash, true )
15691569 ls.Write( this.FirstTimestamp, false )
15701570 ls.Write( this.TimestampRange, false )
15711571
0 commit comments