mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-02-23 06:54:21 +01:00
wait for completion using allOf().joins()
This commit is contained in:
@@ -66,6 +66,18 @@ public class ChannelDetailsService {
|
||||
CompletableFuture<ChannelWarnings> channelWarnings = getChannelWarnings(localChannel);
|
||||
CompletableFuture<Optional<ChannelRating>> rating = getRating(channelId);
|
||||
try {
|
||||
CompletableFuture.allOf(
|
||||
remoteAlias,
|
||||
balanceInformation,
|
||||
onChainCosts,
|
||||
policies,
|
||||
feeReport,
|
||||
flowReport,
|
||||
rebalanceReport,
|
||||
channelWarnings,
|
||||
rating
|
||||
).join();
|
||||
|
||||
return new ChannelDetails(
|
||||
localChannel,
|
||||
remoteAlias.get(),
|
||||
|
||||
@@ -78,6 +78,17 @@ public class NodeDetailsService {
|
||||
List<ChannelId> forceClosingChannelIds =
|
||||
getSortedChannelIds(channelService.getForceClosingChannelsWith(pubkey));
|
||||
try {
|
||||
CompletableFuture.allOf(
|
||||
node,
|
||||
onlineReport,
|
||||
onChainCosts,
|
||||
balanceInformation,
|
||||
feeReport,
|
||||
flowReport,
|
||||
rebalanceReport,
|
||||
nodeWarnings,
|
||||
rating
|
||||
).join();
|
||||
return new NodeDetails(
|
||||
pubkey,
|
||||
node.get().alias(),
|
||||
|
||||
Reference in New Issue
Block a user