Skip to content

Commit b8142cb

Browse files
committed
scenarios: ln_init wait for node and edge sync
1 parent e63b137 commit b8142cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/scenarios/ln_init.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,12 @@ def funded_lnnodes():
9797
self.log.info(f"Waiting for graph gossip sync, LN nodes remaining: {ln_nodes_gossip}")
9898
for index in ln_nodes_gossip:
9999
lnnode = self.warnet.tanks[index].lnnode
100-
if len(lnnode.lncli("describegraph")["edges"]) == len(chan_opens):
100+
my_edges = len(lnnode.lncli("describegraph")["edges"])
101+
my_nodes = len(lnnode.lncli("describegraph")["nodes"])
102+
if my_edges == len(chan_opens) and my_nodes == len(ln_nodes):
101103
ln_nodes_gossip.remove(index)
104+
else:
105+
self.log.info(f" node {index} not synced (channels: {my_edges}/{len(chan_opens)}, nodes: {my_nodes}/{len(ln_nodes)})")
102106
sleep(5)
103107

104108
self.log.info("Updating channel policies")

0 commit comments

Comments
 (0)