mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-01-29 13:34:20 +01:00
CLN multinut test fix (#602)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user