Skip to content

Commit 3e313e9

Browse files
committed
ln send update: try/catch in case of error
1 parent 243d4cd commit 3e313e9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

resources/scenarios/ln_init.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,13 @@ def ln_all_chs(self, ln):
311311

312312
def update_policy(self, ln, txid_hex, policy, capacity):
313313
self.log.info(f"Sending update from {ln.name} for channel with outpoint: {txid_hex}:0")
314-
res = ln.update(txid_hex, policy, capacity)
314+
res = None
315+
while res is None:
316+
try:
317+
res = ln.update(txid_hex, policy, capacity)
318+
break
319+
except Exception:
320+
sleep(1)
315321
assert len(res["failed_updates"]) == 0, (
316322
f" Failed updates: {res['failed_updates']}\n txid: {txid_hex}\n policy:{policy}"
317323
)

0 commit comments

Comments
 (0)