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:
ccdle12 committed 2019-01-10 22:11:38 -05:00
1 parent cd15de4144
commit 264293ff89
2 files changed
+135

No files matched your search

+3
View File
@@ -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)