Skip to content

Always have data-loss protection #19

@ysangkok

Description

@ysangkok

Data-loss protection is mandatory for LND, and I think also for Eclair. I don't think it makes much sense to even do init's anywhere without it.

Here is the temporary patch I use to set the required bit. Of course that doesn't actually modify the messages.

I just wanted to make an issue for this since it is one of the first issues one will encounter, trying to use DotNetLightning.

diff --git a/src/DotNetLightning.Infrastructure/PeerManager.fs b/src/DotNetLightning.Infrastructure/PeerManager.fs
index e6ef117..913d4aa 100644
--- a/src/DotNetLightning.Infrastructure/PeerManager.fs
+++ b/src/DotNetLightning.Infrastructure/PeerManager.fs
@@ -79,7 +79,7 @@ type PeerManager(eventAggregator: IEventAggregator,
                 | true -> ()
                 | _ -> failwithf "Duplicate Connection with %A" nodeId
                 let localFeatures = 
-                    let lf = (LocalFeatures.Flags [||])
+                    let lf = (LocalFeatures.Flags [|3uy|])
                     if nodeParamsValue.RequireInitialRoutingSync then
                         lf.SetInitialRoutingSync()
                     else

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions