mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
rpc: don't count pending channels in total channel balance
This commit is contained in:
parent
e1152148b7
commit
54177557be
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user