Skip to content

Commit

Permalink
just add fixmes
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Sep 2, 2020
1 parent b7d2542 commit 2826ba5
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/DotNetLightning.Core/Utils/Primitives.fs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ module Primitives =
| SortedPlain = 0uy
| ZLib = 1uy

[<StructAttribute>]
// FIXME: change to DU or record instead of adding [<Struct>]?
[<Struct>]
type CommitmentNumber(index: UInt48) =
member this.Index = index

Expand Down Expand Up @@ -493,7 +494,8 @@ module Primitives =
remotePaymentBasePoint
ObscuredCommitmentNumber((UInt48.MaxValue - this.Index) ^^^ obscureFactor)

and [<StructAttribute>] ObscuredCommitmentNumber(obscuredIndex: UInt48) =
// FIXME: change to DU or record instead of adding [<Struct>]?
and [<Struct>] ObscuredCommitmentNumber(obscuredIndex: UInt48) =
member this.ObscuredIndex: UInt48 = obscuredIndex

override this.ToString() =
Expand Down Expand Up @@ -533,7 +535,8 @@ module Primitives =
remotePaymentBasePoint
CommitmentNumber(UInt48.MaxValue - (this.ObscuredIndex ^^^ obscureFactor))

[<StructAttribute>]
// FIXME: change to DU or record instead of adding [<Struct>]?
[<Struct>]
type RevocationKey(key: Key) =
member this.Key = key

Expand Down Expand Up @@ -565,7 +568,8 @@ module Primitives =
member this.CommitmentPubKey: CommitmentPubKey =
CommitmentPubKey this.Key.PubKey

and [<StructAttribute>] CommitmentPubKey(pubKey: PubKey) =
// FIXME: change to DU or record instead of adding [<Struct>]?
and [<Struct>] CommitmentPubKey(pubKey: PubKey) =
member this.PubKey = pubKey

static member BytesLength: int = PubKey.BytesLength
Expand All @@ -576,8 +580,8 @@ module Primitives =
member this.ToByteArray(): array<byte> =
this.PubKey.ToBytes()


[<StructAttribute>]
// FIXME: change to DU or record instead of adding [<Struct>]?
[<Struct>]
type CommitmentSeed(masterRevocationKey: RevocationKey) =
new(key: Key) =
CommitmentSeed(RevocationKey key)
Expand Down

0 comments on commit 2826ba5

Please sign in to comment.