rpc: display HTLC amount in satoshis in ListChannels response

Before this commit, they were displayed in mSAT which violates the
current trend of always displaying amounts externally in satoshis.
This commit is contained in:
Olaoluwa Osuntokun 2017-11-15 18:23:51 -08:00
parent f189e2395a
commit 1be2a2a56a
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -1337,7 +1337,7 @@ func (r *rpcServer) ListChannels(ctx context.Context,
for i, htlc := range localCommit.Htlcs { for i, htlc := range localCommit.Htlcs {
channel.PendingHtlcs[i] = &lnrpc.HTLC{ channel.PendingHtlcs[i] = &lnrpc.HTLC{
Incoming: htlc.Incoming, Incoming: htlc.Incoming,
Amount: int64(htlc.Amt), Amount: int64(htlc.Amt.ToSatoshis()),
HashLock: htlc.RHash[:], HashLock: htlc.RHash[:],
ExpirationHeight: htlc.RefundTimeout, ExpirationHeight: htlc.RefundTimeout,
} }