File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/DotNetLightning.Core/Transactions Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,17 +41,17 @@ type CommitmentSpec = {
4141 { this with ToRemote = this.ToRemote - update.Amount; IncomingHTLCs = this.IncomingHTLCs.Add( update.HTLCId, update)}
4242
4343 member internal this.FulfillOutgoingHTLC ( htlcId : HTLCId ) =
44- match this.OutgoingHTLCs |> Map.tryFind htlcId with
44+ match this.IncomingHTLCs |> Map.tryFind htlcId with
4545 | Some htlc ->
46- { this with ToLocal = this.ToLocal + htlc.Amount; OutgoingHTLCs = this.OutgoingHTLCs .Remove htlcId }
46+ { this with ToLocal = this.ToLocal + htlc.Amount; IncomingHTLCs = this.IncomingHTLCs .Remove htlcId }
4747 |> Ok
4848 | None ->
4949 UnknownHTLC htlcId |> Error
5050
5151 member internal this.FulfillIncomingHTLC ( htlcId : HTLCId ) =
52- match this.IncomingHTLCs |> Map.tryFind htlcId with
52+ match this.OutgoingHTLCs |> Map.tryFind htlcId with
5353 | Some htlc ->
54- { this with ToRemote = this.ToRemote + htlc.Amount; IncomingHTLCs = this.IncomingHTLCs .Remove htlcId }
54+ { this with ToRemote = this.ToRemote + htlc.Amount; OutgoingHTLCs = this.OutgoingHTLCs .Remove htlcId }
5555 |> Ok
5656 | None ->
5757 UnknownHTLC htlcId |> Error
You can’t perform that action at this time.
0 commit comments