CLN multinut test fix (#602)

This commit is contained in:
lollerfirst
2024-07-30 16:30:01 +02:00
committed by GitHub
parent e14dc6d7ca
commit 77ba356499
3 changed files with 39 additions and 13 deletions

View File

@@ -96,6 +96,16 @@ docker_lightning_unconnected_cli = [
"--rpcserver=lnd-2",
]
def docker_clightning_cli(index):
return [
"docker",
"exec",
f"cashu-clightning-{index}-1",
"lightning-cli",
"--network",
"regtest",
"--keywords",
]
def run_cmd(cmd: list) -> str:
timeout = 20
@@ -161,6 +171,10 @@ def pay_real_invoice(invoice: str) -> str:
cmd.extend(["payinvoice", "--force", invoice])
return run_cmd(cmd)
def partial_pay_real_invoice(invoice: str, amount: int, node: int) -> str:
cmd = docker_clightning_cli(node)
cmd.extend(["pay", f"bolt11={invoice}", f"partial_msat={amount*1000}"])
return run_cmd(cmd)
def mine_blocks(blocks: int = 1) -> str:
cmd = docker_bitcoin_cli.copy()