Skip to content

Commit 677e68f

Browse files
committed
lnnode: test for failures in update channel policy
1 parent b8142cb commit 677e68f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/warnet/lnnode.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ def open_channel_to_tank(self, index: int, policy: str) -> str:
9090
raise Exception(f"Opened channel with txid {txid} not found in pending channels")
9191

9292
def update_channel_policy(self, chan_point: str, policy: str) -> str:
93-
return self.lncli(f"updatechanpolicy --chan_point={chan_point} {policy}")
93+
ret = self.lncli(f"updatechanpolicy --chan_point={chan_point} {policy}")
94+
if len(ret["failed_updates"]) == 0:
95+
return ret
96+
else:
97+
raise Exception(ret)
9498

9599
def connect_to_tank(self, index):
96100
tank = self.warnet.tanks[index]

0 commit comments

Comments
 (0)