From d63b923f5efb84fa45ee7679d9ffa26c81cfe0e4 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 17 Apr 2018 19:05:07 -0700 Subject: [PATCH] Revert "rpcserver: remove uneccessary signal to breacharbiter at force close" This reverts commit 0f90c950daaec7843e305f32d10e36411fb0b47f. We actually still need to notify the BRAR of a force close, as otherwise, it doesn't have a signal to exit due to a local force close event. --- rpcserver.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rpcserver.go b/rpcserver.go index e37a843f..dbf8afc4 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -1031,6 +1031,12 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest, r.server.htlcSwitch.RemoveLink(chanID) } + select { + case r.server.breachArbiter.settledContracts <- *chanPoint: + case <-r.quit: + return fmt.Errorf("server shutting down") + } + // With the necessary indexes cleaned up, we'll now force close // the channel. chainArbitrator := r.server.chainArb