Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always have data-loss protection #19

Open
ysangkok opened this issue Oct 9, 2019 · 3 comments
Open

Always have data-loss protection #19

ysangkok opened this issue Oct 9, 2019 · 3 comments

Comments

@ysangkok
Copy link
Contributor

ysangkok commented Oct 9, 2019

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
@joemphilips
Copy link
Owner

Thanks, I didn't have enough time to review the init message handling in detail. (especially it seems that the spec has changed recently)

@ysangkok
Copy link
Contributor Author

Closing because I stopped using DotNetLightning and I don't know whether this is still current.

@knocte
Copy link
Collaborator

knocte commented Nov 23, 2021

@ysangkok sorry, I would prefer if @joemphilips decides if this should be left open or not; Joe please reopen if you think this is still an issue? or if you're not sure, reopen as well and my team will look at it at some point.

@joemphilips joemphilips reopened this Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants