From 54177557beba25933afd92f3567118981b099e06 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 4 May 2017 15:25:05 -0700 Subject: [PATCH] rpc: don't count pending channels in total channel balance --- rpcserver.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rpcserver.go b/rpcserver.go index 4b274dcc2..0453c1607 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -776,7 +776,9 @@ func (r *rpcServer) ChannelBalance(ctx context.Context, var balance btcutil.Amount for _, channel := range channels { - balance += channel.OurBalance + if !channel.IsPending { + balance += channel.OurBalance + } } return &lnrpc.ChannelBalanceResponse{Balance: int64(balance)}, nil