include waiting close and pending force closing channel IDs in node details

This commit is contained in:
Carsten Otto
2021-11-21 22:43:53 +01:00
parent 1428db620d
commit 1deff486a8
6 changed files with 84 additions and 13 deletions

View File

@@ -101,6 +101,18 @@ public class ChannelService {
.collect(Collectors.toSet());
}
public Set<WaitingCloseChannel> getWaitingCloseChannelsFor(Pubkey peer) {
return getWaitingCloseChannels().stream()
.filter(c -> peer.equals(c.getRemotePubkey()))
.collect(Collectors.toSet());
}
public Set<ForceClosingChannel> getForceClosingChannelsFor(Pubkey peer) {
return getForceClosingChannels().stream()
.filter(c -> peer.equals(c.getRemotePubkey()))
.collect(Collectors.toSet());
}
public Set<LocalChannel> getAllChannelsWith(Pubkey peer) {
return getAllLocalChannels()
.filter(c -> peer.equals(c.getRemotePubkey()))