@@ -40,9 +40,9 @@ module Primitives =
4040 type BlockHeight = | BlockHeight of uint32 with
4141 static member Zero = 0 u |> BlockHeight
4242 static member One = 1 u |> BlockHeight
43- member x .Value = let ( BlockHeight v ) = x in v
44- member x .AsOffset() =
45- x .Value |> Checked.uint16 |> BlockHeightOffset16
43+ member this .Value = let ( BlockHeight v ) = this in v
44+ member this .AsOffset() =
45+ this .Value |> Checked.uint16 |> BlockHeightOffset16
4646
4747 static member (+) ( a : BlockHeight , b : BlockHeightOffset16 ) =
4848 a.Value + ( uint32 b.Value ) |> BlockHeight
@@ -67,7 +67,7 @@ module Primitives =
6767 [<Struct>]
6868#endif
6969 BlockHeightOffset16 = | BlockHeightOffset16 of uint16 with
70- member x .Value = let ( BlockHeightOffset16 v ) = x in v
70+ member this .Value = let ( BlockHeightOffset16 v ) = this in v
7171
7272 static member ofBlockHeightOffset32 ( bho32 : BlockHeightOffset32 ) =
7373 BlockHeightOffset16 ( uint16 bho32.Value)
@@ -90,7 +90,7 @@ module Primitives =
9090 [<Struct>]
9191#endif
9292 BlockHeightOffset32 = | BlockHeightOffset32 of uint32 with
93- member x .Value = let ( BlockHeightOffset32 v ) = x in v
93+ member this .Value = let ( BlockHeightOffset32 v ) = this in v
9494
9595 static member ofBlockHeightOffset16 ( bho16 : BlockHeightOffset16 ) =
9696 BlockHeightOffset32 ( uint32 bho16.Value)
@@ -110,7 +110,7 @@ module Primitives =
110110 /// 3. Custom `ToString`
111111 [<CustomEquality; CustomComparison; StructuredFormatDisplay( " {AsString}" ) >]
112112 type LNECDSASignature = LNECDSASignature of ECDSASignature | Empty with
113- member x .Value = match x with LNECDSASignature s -> s | Empty -> failwith " Unreachable!"
113+ member this .Value = match this with LNECDSASignature s -> s | Empty -> failwith " Unreachable!"
114114 override this.GetHashCode () = hash this.Value
115115 override this.Equals ( obj : obj ) =
116116 match obj with
@@ -172,10 +172,10 @@ module Primitives =
172172 ec |> LNECDSASignature
173173
174174 type PaymentHash = | PaymentHash of uint256 with
175- member x .Value = let ( PaymentHash v ) = x in v
176- member x .ToBytes(? lEndian ) =
175+ member this .Value = let ( PaymentHash v ) = this in v
176+ member this .ToBytes(? lEndian ) =
177177 let e = defaultArg lEndian false
178- x .Value.ToBytes( e )
178+ this .Value.ToBytes e
179179
180180 member x.GetRIPEMD160 () =
181181 let b = x.Value.ToBytes() |> Array.rev
@@ -245,7 +245,7 @@ module Primitives =
245245
246246 [<CustomEquality; CustomComparison>]
247247 type ComparablePubKey = ComparablePubKey of PubKey with
248- member x .Value = let ( ComparablePubKey v ) = x in v
248+ member this .Value = let ( ComparablePubKey v ) = this in v
249249 interface IComparable with
250250 override this.CompareTo ( other ) =
251251 match other with
@@ -261,7 +261,7 @@ module Primitives =
261261
262262 [<CustomEquality; CustomComparison>]
263263 type NodeId = | NodeId of PubKey with
264- member x .Value = let ( NodeId v ) = x in v
264+ member this .Value = let ( NodeId v ) = this in v
265265 interface IComparable with
266266 override this.CompareTo ( other ) =
267267 match other with
@@ -278,7 +278,7 @@ module Primitives =
278278 /// So that it supports comparison and equality constraints
279279 [<CustomComparison; CustomEquality>]
280280 type LNOutPoint = LNOutPoint of OutPoint with
281- member x .Value = let ( LNOutPoint v ) = x in v
281+ member this .Value = let ( LNOutPoint v ) = this in v
282282
283283 member this.CompareTo ( other : LNOutPoint ) =
284284 if this.Value.Hash > other.Value.Hash then
@@ -315,7 +315,7 @@ module Primitives =
315315
316316 /// feerate per kilo weight
317317 type FeeRatePerKw = | FeeRatePerKw of uint32 with
318- member x .Value = let ( FeeRatePerKw v ) = x in v
318+ member this .Value = let ( FeeRatePerKw v ) = this in v
319319 static member FromFee ( fee : Money , weight : uint64 ) =
320320 ((( uint64 fee.Satoshi) * 1000 UL) / weight)
321321 |> uint32
@@ -363,28 +363,28 @@ module Primitives =
363363
364364 /// Block Hash
365365 type BlockId = | BlockId of uint256 with
366- member x .Value = let ( BlockId v ) = x in v
366+ member this .Value = let ( BlockId v ) = this in v
367367
368368#if ! NoDUsAsStructs
369369 [<Struct>]
370370#endif
371371 type HTLCId = | HTLCId of uint64 with
372372 static member Zero = HTLCId( 0 UL)
373- member x .Value = let ( HTLCId v ) = x in v
373+ member this .Value = let ( HTLCId v ) = this in v
374374
375375 static member (+) ( a : HTLCId , b : uint64 ) = ( a.Value + b) |> HTLCId
376376
377377#if ! NoDUsAsStructs
378378 [<Struct>]
379379#endif
380380 type TxOutIndex = | TxOutIndex of uint16 with
381- member x .Value = let ( TxOutIndex v ) = x in v
381+ member this .Value = let ( TxOutIndex v ) = this in v
382382
383383#if ! NoDUsAsStructs
384384 [<Struct>]
385385#endif
386386 type TxIndexInBlock = | TxIndexInBlock of uint32 with
387- member x .Value = let ( TxIndexInBlock v ) = x in v
387+ member this .Value = let ( TxIndexInBlock v ) = this in v
388388
389389#if ! NoDUsAsStructs
390390 [<Struct; StructuredFormatDisplay( " {AsString}" ) >]
@@ -484,11 +484,11 @@ module Primitives =
484484 sprintf " Invalid final script pubkey(%A ). it must be one of p2pkh, p2sh, p2wpkh, p2wsh" scriptPubKey
485485 |> Error
486486
487- member self .ScriptPubKey(): Script =
488- self .ShutdownScript
487+ member this .ScriptPubKey(): Script =
488+ this .ShutdownScript
489489
490- member self .ToBytes(): array < byte > =
491- self .ShutdownScript.ToBytes()
490+ member this .ToBytes(): array < byte > =
491+ this .ShutdownScript.ToBytes()
492492
493493 type ChannelFlags = {
494494 // Set to announce the channel publicly and notify all nodes that they
@@ -505,8 +505,8 @@ module Primitives =
505505 AnnounceChannel = ( flags &&& ChannelFlags.AnnounceChannelMask) = ChannelFlags.AnnounceChannelMask
506506 }
507507
508- member self .IntoUInt8(): uint8 =
509- if self .AnnounceChannel then
508+ member this .IntoUInt8(): uint8 =
509+ if this .AnnounceChannel then
510510 ChannelFlags.AnnounceChannelMask
511511 else
512512 0 uy
0 commit comments