From 08d9edd059350b67c8c7adf075f53ffdf507135e Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Wed, 30 May 2018 12:03:45 +0200 Subject: [PATCH] server: increase updateChan buffer to 2 --- server.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server.go b/server.go index 49027332e..080f2539d 100644 --- a/server.go +++ b/server.go @@ -2006,7 +2006,11 @@ func (s *server) OpenChannel(nodeKey *btcec.PublicKey, fundingFeePerVSize lnwallet.SatPerVByte, private bool, remoteCsvDelay uint16) (chan *lnrpc.OpenStatusUpdate, chan error) { - updateChan := make(chan *lnrpc.OpenStatusUpdate, 1) + // The updateChan will have a buffer of 2, since we expect a + // ChanPending + a ChanOpen update, and we want to make sure the + // funding process is not blocked if the caller is not reading the + // updates. + updateChan := make(chan *lnrpc.OpenStatusUpdate, 2) errChan := make(chan error, 1) var (