Merge pull request #5931 from yyforyongyu/5924-remote-balance

rpcserver: add remote balance for pending force close
This commit is contained in:
Oliver Gugger authored and GitHub committed 2021-12-14 10:02:23 +01:00
commit 6d59a2c807
2 files changed
+11

No files matched your search

@@ -19,6 +19,13 @@
* [Allow disabling migrations if the database backend passed to `channeldb` was
opened in read-only mode](https://github.com/lightningnetwork/lnd/pull/6084).
## RPC Server
* [Add value to the field
`remote_balance`](https://github.com/lightningnetwork/lnd/pull/5931) in
`pending_force_closing_channels` under `pendingchannels` whereas before was
empty(zero).
## Code Health
### Code cleanup, refactor, typo fixes
+4
View File
@@ -3317,6 +3317,10 @@ func (r *rpcServer) PendingChannels(ctx context.Context,
}
channel.NumForwardingPackages = int64(len(fwdPkgs))
channel.RemoteBalance = int64(
historical.LocalCommitment.RemoteBalance.ToSatoshis(),
)
// If the error is non-nil, and not due to older versions of lnd
// not persisting historical channels, return it.
default: