rpc: don't count pending channels in total channel balance

This commit is contained in:
Olaoluwa Osuntokun committed 2017-05-04 17:39:10 -07:00
1 parent e1152148b7
commit 54177557be
1 file changed
+3 -1
+3 -1
View File
@@ -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