Skip to content

Commit

Permalink
DotNetRGS: fix build with Mono
Browse files Browse the repository at this point in the history
  • Loading branch information
aarani committed May 26, 2023
1 parent d5bd945 commit 6588748
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DotNetRGS/GossipSnapshotter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ type GossipSnapshotter
let timestamp =
if factor <> Int32.MaxValue then
referenceTimestamp.Subtract(
TimeSpan.FromDays factor
factor |> float |> TimeSpan.FromDays
)
else
DateTime.MinValue
Expand Down
8 changes: 7 additions & 1 deletion DotNetRGS/NetworkGraph.fs
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,16 @@ type NetworkGraph(dataDir: DirectoryInfo) =
|> Map.ofSeq

member _.GetChannelIds() =
let keys(map: Map<'K, 'V>) =
seq {
for KeyValue(key, value) in map do
yield key
}

Monitor.Enter channelsLock

try
channels.Keys |> Array.ofSeq
channels |> keys |> Array.ofSeq
finally
Monitor.Exit channelsLock

Expand Down

0 comments on commit 6588748

Please sign in to comment.