mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-26 22:17:51 +01:00
rpcserver+lnd_test: adding PendingHtlcs to UnsetteldBalance
rpcserver: summing PendingHtlcs and assigning to UnsettledBalance lnd_test: adding tests for UnsettledBalance
This commit is contained in:
@@ -2314,6 +2314,9 @@ func (r *rpcServer) ListChannels(ctx context.Context,
|
||||
HashLock: rHash[:],
|
||||
ExpirationHeight: htlc.RefundTimeout,
|
||||
}
|
||||
|
||||
// Add the Pending Htlc Amount to UnsettledBalance field.
|
||||
channel.UnsettledBalance += channel.PendingHtlcs[i].Amount
|
||||
}
|
||||
|
||||
resp.Channels = append(resp.Channels, channel)
|
||||
|
||||
Reference in New Issue
Block a user