Skip to content

Commit f232768

Browse files
committed
fix eclair channelbalance calculation issue
1 parent 4a109cf commit f232768

File tree

1 file changed

+2
-2
lines changed
  • resources/scenarios/ln_framework

1 file changed

+2
-2
lines changed

resources/scenarios/ln_framework/ln.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,12 +539,12 @@ def channelbalance(self, max_tries=2) -> int:
539539
attempt = 0
540540
while attempt < max_tries:
541541
attempt += 1
542-
response = self.post("/usablebalances")
542+
response = self.post("/channelbalances")
543543
if not response:
544544
sleep(2)
545545
continue
546546
res = json.loads(response)
547-
return int(sum(o["canSend"] + o["canReceive"] for o in res))
547+
return int(sum(o["canSend"] for o in res) / 1000)
548548
return 0
549549

550550
def connect(self, target_uri, max_tries=5) -> dict:

0 commit comments

Comments
 (0)