Skip to content

Commit

Permalink
GossipSnapshotter: use match instead of if
Browse files Browse the repository at this point in the history
  • Loading branch information
aarani committed Jun 6, 2023
1 parent 1fae4e9 commit ac926d4
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions DotNetRGS/GossipSnapshotter.fs
Expand Up @@ -564,15 +564,11 @@ type GossipSnapshotter
previouslySeenDirections,
updateDelta


let lastSeenUpdate =
updateDelta.LastUpdateBeforeSeen

let updateDelta =
if lastSeenUpdate.IsSome then
let lastSeenUpdate =
lastSeenUpdate.Value

match
updateDelta.LastUpdateBeforeSeen
with
| Some lastSeenUpdate ->
{ updateDelta with
MutatedProperties =
{ MutatedProperties.Default with
Expand All @@ -596,8 +592,7 @@ type GossipSnapshotter
<> lastSeenUpdate.HTLCMaximumMSat
}
}
else
updateDelta
| None -> updateDelta

let channelDelta =
if not direction then
Expand Down

0 comments on commit ac926d4

Please sign in to comment.