From c815821679d7b1ab3985eb11b312f492d74075d9 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 17 Jan 2019 16:53:43 -0800 Subject: [PATCH] server: require the DLP bit for all incoming/outgoing connections In this commit, we modify our default local feature bits to require the Data Loss Protection (DLP) feature to be active. Once full Static Channel Backups are implemented, if we connect to a peer that doesn't follow the DLP protocol, then the SCBs are useless, as we may not be able to recover funds. As a result, in prep for full SCB deployment, we'll now ensure that any peer we connect to, knows of the DLP bit. This could be a bit more relaxed and allow _connections_ to non-DLP peers, but reject channel requests to/from them. However, this implementation is much simpler. --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index 7f423e6e..04c62c38 100644 --- a/server.go +++ b/server.go @@ -2368,7 +2368,7 @@ func (s *server) peerConnected(conn net.Conn, connReq *connmgr.ConnReq, // We'll signal that we understand the data loss protection feature, // and also that we support the new gossip query features. - localFeatures.Set(lnwire.DataLossProtectOptional) + localFeatures.Set(lnwire.DataLossProtectRequired) localFeatures.Set(lnwire.GossipQueriesOptional) // Now that we've established a connection, create a peer, and it to