Coder Social home page Coder Social logo

Comments (2)

dni avatar dni commented on August 11, 2024

we temporarily used this patch for the node not to immediately crash, and ran lighning-cli dev-forget-channel to remove the broken channels

diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c
index ead4f76a2..d39058dba 100644
--- a/lightningd/peer_control.c
+++ b/lightningd/peer_control.c
@@ -1406,7 +1406,10 @@ static void peer_connected_hook_final(struct peer_connected_hook_payload *payloa
                        log_debug(channel->log, "Peer has reconnected, state %s: connecting subd",
                                  channel_state_name(channel));

-                       connect_activate_subd(ld, channel);
+                       if (strcmp(channel_state_name(channel), "CHANNELD_AWAITING_LOCKIN") != 0
+                          && strcmp(channel_state_name(channel), "CHANNELD_SHUTTING_DOWN") != 0) {
+                               connect_activate_subd(ld, channel);
+                       }
                }
        }

@@ -1799,6 +1802,9 @@ void peer_spoke(struct lightningd *ld, const u8 *msg)
                        log_debug(channel->log,
                                  "Reestablish on %s channel: using channeld to reply",
                                  channel_state_name(channel));
+                       if (strcmp(channel_state_name(channel), "AWAITING_UNILATERAL") != 0) {
+                               return;
+                       }
                        if (socketpair(AF_LOCAL, SOCK_STREAM, 0, fds) != 0) {
                                log_broken(channel->log,
                                           "Failed to create socketpair: %s",

from lightning.

BitcoinJiuJitsu avatar BitcoinJiuJitsu commented on August 11, 2024

Open CLN bounty on this:
https://community.sphinx.chat/p/clt2n32tu2rjujq1jn6g/bounties/2158/2

from lightning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.