Skip to content

Commit 73606f8

Browse files
committed
Refactor hsmtool to remove some redundant function.
gets rid of get_hsm_seed which would prompt the user for a password. We were prompting the user for a password 2-3 times., now only load_hsm_secret prompts the user for a password. The exception is check_hsm which requires you to reenter your password. Also, added a skeleton of some tests I'd like to add but none of them work just yet.
1 parent 2e887e1 commit 73606f8

3 files changed

Lines changed: 293 additions & 133 deletions

File tree

common/hsm_secret.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ enum hsm_secret_type detect_hsm_secret_type(const u8 *hsm_secret, size_t len)
8484
return HSM_SECRET_ENCRYPTED;
8585

8686
/* Check if it starts with our type bytes (mnemonic formats) */
87-
//TODO: We can possibly remove this check, and check the first 32 bytes to see if they are are all zero
8887
if (len > 32) {
8988
if (memeqzero(hsm_secret, 32))
9089
return HSM_SECRET_MNEMONIC_NO_PASS;

tests/test_wallet.py

Lines changed: 276 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,101 +1445,320 @@ def test_hsmtool_dump_descriptors(node_factory, bitcoind):
14451445
res = bitcoind.rpc.scantxoutset("start", [{"desc": descriptor, "range": [actual_index, actual_index]}])
14461446
assert res["total_amount"] == Decimal('0.00001000')
14471447

1448-
1449-
def test_hsmtool_generatehsm(node_factory):
1448+
def test_hsmtool_generatehsm_with_passphrase(node_factory):
1449+
"""Test generating mnemonic-based hsm_secret with passphrase"""
14501450
l1 = node_factory.get_node(start=False)
1451-
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK,
1452-
"hsm_secret")
1451+
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "hsm_secret")
1452+
os.remove(hsm_path) # Remove the auto-generated one
14531453

1454+
# Generate hsm_secret with mnemonic and passphrase
14541455
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
1455-
1456-
# You cannot re-generate an already existing hsm_secret
14571456
master_fd, slave_fd = os.openpty()
14581457
hsmtool.start(stdin=slave_fd)
1459-
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 2
1458+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1459+
write_all(master_fd, "ritual idle hat sunny universe pluck key alpha wing cake have wedding\n".encode("utf-8"))
1460+
hsmtool.wait_for_log(r"Enter your passphrase:")
1461+
write_all(master_fd, "test_passphrase\n".encode("utf-8"))
1462+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1463+
hsmtool.is_in_log(r"New hsm_secret file created")
1464+
hsmtool.is_in_log(r"Format: mnemonic with passphrase")
1465+
1466+
# Verify file format
1467+
with open(hsm_path, 'rb') as f:
1468+
content = f.read()
1469+
# First 32 bytes should NOT be zeros (has passphrase hash)
1470+
assert content[:32] != b'\x00' * 32
1471+
# Rest should be the mnemonic
1472+
mnemonic_part = content[32:].decode('utf-8')
1473+
assert "ritual idle hat sunny universe pluck key alpha wing cake have wedding" in mnemonic_part
1474+
1475+
# Verify Lightning node can use it
1476+
l1.start()
1477+
node_id = l1.info['id']
1478+
assert len(node_id) == 66 # Valid node ID
1479+
l1.stop()
1480+
1481+
def test_hsmtool_generatehsm_no_passphrase(node_factory):
1482+
"""Test generating mnemonic-based hsm_secret without passphrase"""
1483+
l1 = node_factory.get_node(start=False)
1484+
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "hsm_secret")
14601485
os.remove(hsm_path)
14611486

1462-
# We can generate a valid hsm_secret from a wordlist and a "passphrase"
1487+
# Generate hsm_secret with mnemonic but no passphrase
1488+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
14631489
master_fd, slave_fd = os.openpty()
14641490
hsmtool.start(stdin=slave_fd)
1465-
hsmtool.wait_for_log(r"Select your language:")
1466-
write_all(master_fd, "0\n".encode("utf-8"))
14671491
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1468-
write_all(master_fd, "ritual idle hat sunny universe pluck key alpha wing "
1469-
"cake have wedding\n".encode("utf-8"))
1492+
write_all(master_fd, "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\n".encode("utf-8"))
14701493
hsmtool.wait_for_log(r"Enter your passphrase:")
1471-
write_all(master_fd, "This is actually not a passphrase\n".encode("utf-8"))
1472-
if hsmtool.proc.wait(WAIT_TIMEOUT) != 0:
1473-
hsmtool.logs_catchup()
1474-
print("hsmtool failure! Logs:")
1475-
for l in hsmtool.logs:
1476-
print(' ' + l)
1477-
assert False
1494+
write_all(master_fd, "\n".encode("utf-8")) # Empty passphrase
1495+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
14781496
hsmtool.is_in_log(r"New hsm_secret file created")
1497+
hsmtool.is_in_log(r"Format: mnemonic without passphrase")
1498+
1499+
# Verify file format
1500+
with open(hsm_path, 'rb') as f:
1501+
content = f.read()
1502+
# First 32 bytes should be zeros (no passphrase)
1503+
assert content[:32] == b'\x00' * 32
1504+
# Rest should be the mnemonic
1505+
mnemonic_part = content[32:].decode('utf-8')
1506+
assert "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" in mnemonic_part
1507+
1508+
# Verify Lightning node can use it
1509+
l1.start()
1510+
node_id = l1.info['id']
1511+
assert len(node_id) == 66 # Valid node ID
1512+
l1.stop()
14791513

1480-
# Check should pass.
1481-
hsmtool = HsmTool(node_factory.directory, "checkhsm", hsm_path)
1514+
1515+
def test_hsmtool_checkhsm_with_passphrase(node_factory):
1516+
"""Test checkhsm with mnemonic that has a passphrase"""
1517+
l1 = node_factory.get_node(start=False)
1518+
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "hsm_secret")
1519+
os.remove(hsm_path)
1520+
1521+
# Create hsm_secret with known mnemonic and passphrase
1522+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
14821523
master_fd, slave_fd = os.openpty()
14831524
hsmtool.start(stdin=slave_fd)
1525+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1526+
write_all(master_fd, "ritual idle hat sunny universe pluck key alpha wing cake have wedding\n".encode("utf-8"))
14841527
hsmtool.wait_for_log(r"Enter your passphrase:")
1485-
write_all(master_fd, "This is actually not a passphrase\n".encode("utf-8"))
1486-
hsmtool.wait_for_log(r"Select your language:")
1487-
write_all(master_fd, "0\n".encode("utf-8"))
1528+
write_all(master_fd, "secret_passphrase\n".encode("utf-8"))
1529+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1530+
1531+
# Test checkhsm with correct credentials
1532+
hsmtool = HsmTool(node_factory.directory, "checkhsm", hsm_path)
1533+
master_fd, slave_fd = os.openpty()
1534+
hsmtool.start(stdin=slave_fd)
1535+
hsmtool.wait_for_log(r"Enter hsm_secret password:") # Unlock file
1536+
write_all(master_fd, "secret_passphrase\n".encode("utf-8"))
1537+
hsmtool.wait_for_log(r"Enter your passphrase:") # Verification passphrase
1538+
write_all(master_fd, "secret_passphrase\n".encode("utf-8"))
14881539
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1489-
write_all(master_fd, "ritual idle hat sunny universe pluck key alpha wing "
1490-
"cake have wedding\n".encode("utf-8"))
1540+
write_all(master_fd, "ritual idle hat sunny universe pluck key alpha wing cake have wedding\n".encode("utf-8"))
14911541
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
14921542
hsmtool.is_in_log(r"OK")
14931543

1494-
# Wrong mnemonic will fail.
1544+
1545+
def test_hsmtool_checkhsm_no_passphrase(node_factory):
1546+
"""Test checkhsm with mnemonic that has no passphrase"""
1547+
l1 = node_factory.get_node(start=False)
1548+
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "hsm_secret")
1549+
os.remove(hsm_path)
1550+
1551+
# Create hsm_secret with known mnemonic and no passphrase
1552+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
14951553
master_fd, slave_fd = os.openpty()
14961554
hsmtool.start(stdin=slave_fd)
1555+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1556+
write_all(master_fd, "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\n".encode("utf-8"))
14971557
hsmtool.wait_for_log(r"Enter your passphrase:")
1498-
write_all(master_fd, "This is actually not a passphrase\n".encode("utf-8"))
1499-
hsmtool.wait_for_log(r"Select your language:")
1500-
write_all(master_fd, "0\n".encode("utf-8"))
1558+
write_all(master_fd, "\n".encode("utf-8")) # Empty passphrase
1559+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1560+
1561+
# Test checkhsm with correct credentials (no file unlock needed)
1562+
hsmtool = HsmTool(node_factory.directory, "checkhsm", hsm_path)
1563+
master_fd, slave_fd = os.openpty()
1564+
hsmtool.start(stdin=slave_fd)
1565+
hsmtool.wait_for_log(r"Enter your passphrase:") # Verification passphrase
1566+
write_all(master_fd, "\n".encode("utf-8")) # Empty passphrase
15011567
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
15021568
write_all(master_fd, "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\n".encode("utf-8"))
1503-
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 5
1569+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1570+
hsmtool.is_in_log(r"OK")
1571+
1572+
1573+
def test_hsmtool_checkhsm_wrong_passphrase(node_factory):
1574+
"""Test that checkhsm fails with wrong passphrase"""
1575+
l1 = node_factory.get_node(start=False)
1576+
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "hsm_secret")
1577+
os.remove(hsm_path)
1578+
1579+
# Create hsm_secret with known passphrase
1580+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
1581+
master_fd, slave_fd = os.openpty()
1582+
hsmtool.start(stdin=slave_fd)
1583+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1584+
write_all(master_fd, "ritual idle hat sunny universe pluck key alpha wing cake have wedding\n".encode("utf-8"))
1585+
hsmtool.wait_for_log(r"Enter your passphrase:")
1586+
write_all(master_fd, "correct_passphrase\n".encode("utf-8"))
1587+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1588+
1589+
# Test checkhsm with wrong passphrase
1590+
hsmtool = HsmTool(node_factory.directory, "checkhsm", hsm_path)
1591+
master_fd, slave_fd = os.openpty()
1592+
hsmtool.start(stdin=slave_fd)
1593+
hsmtool.wait_for_log(r"Enter hsm_secret password:") # Unlock file
1594+
write_all(master_fd, "correct_passphrase\n".encode("utf-8"))
1595+
hsmtool.wait_for_log(r"Enter your passphrase:") # Wrong verification passphrase
1596+
write_all(master_fd, "wrong_passphrase\n".encode("utf-8"))
1597+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1598+
write_all(master_fd, "ritual idle hat sunny universe pluck key alpha wing cake have wedding\n".encode("utf-8"))
1599+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 5 # ERROR_KEYDERIV
15041600
hsmtool.is_in_log(r"resulting hsm_secret did not match")
15051601

1506-
# Wrong passphrase will fail.
1602+
1603+
def test_hsmtool_checkhsm_wrong_mnemonic(node_factory):
1604+
"""Test that checkhsm fails with wrong mnemonic"""
1605+
l1 = node_factory.get_node(start=False)
1606+
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "hsm_secret")
1607+
os.remove(hsm_path)
1608+
1609+
# Create hsm_secret with known mnemonic
1610+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
15071611
master_fd, slave_fd = os.openpty()
15081612
hsmtool.start(stdin=slave_fd)
1613+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1614+
write_all(master_fd, "ritual idle hat sunny universe pluck key alpha wing cake have wedding\n".encode("utf-8"))
15091615
hsmtool.wait_for_log(r"Enter your passphrase:")
1510-
write_all(master_fd, "This is actually not a passphrase \n".encode("utf-8"))
1511-
hsmtool.wait_for_log(r"Select your language:")
1512-
write_all(master_fd, "0\n".encode("utf-8"))
1616+
write_all(master_fd, "\n".encode("utf-8")) # No passphrase
1617+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1618+
1619+
# Test checkhsm with wrong mnemonic
1620+
hsmtool = HsmTool(node_factory.directory, "checkhsm", hsm_path)
1621+
master_fd, slave_fd = os.openpty()
1622+
hsmtool.start(stdin=slave_fd)
1623+
hsmtool.wait_for_log(r"Enter your passphrase:")
1624+
write_all(master_fd, "\n".encode("utf-8")) # Correct passphrase (empty)
15131625
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1514-
write_all(master_fd, "ritual idle hat sunny universe pluck key alpha wing "
1515-
"cake have wedding\n".encode("utf-8"))
1516-
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 5
1626+
write_all(master_fd, "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\n".encode("utf-8")) # Wrong mnemonic
1627+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 5 # ERROR_KEYDERIV
15171628
hsmtool.is_in_log(r"resulting hsm_secret did not match")
15181629

1519-
# We can start the node with this hsm_secret
1520-
l1.start()
1521-
assert l1.info['id'] == '02244b73339edd004bc6dfbb953a87984c88e9e7c02ca14ef6ec593ca6be622ba7'
1522-
l1.stop()
15231630

1524-
# We can do the entire thing non-interactive!
1631+
def test_hsmtool_detect_secret_types(node_factory):
1632+
"""Test that hsmtool correctly detects different hsm_secret types"""
1633+
l1 = node_factory.get_node(start=False)
1634+
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "hsm_secret")
1635+
1636+
# Test detection of mnemonic without passphrase
1637+
os.remove(hsm_path)
1638+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
1639+
master_fd, slave_fd = os.openpty()
1640+
hsmtool.start(stdin=slave_fd)
1641+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1642+
write_all(master_fd, "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\n".encode("utf-8"))
1643+
hsmtool.wait_for_log(r"Enter your passphrase:")
1644+
write_all(master_fd, "\n".encode("utf-8"))
1645+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1646+
1647+
# Test getnodeid works with mnemonic format
1648+
cmd_line = ["tools/hsmtool", "getnodeid", hsm_path]
1649+
out = subprocess.check_output(cmd_line).decode("utf8").strip()
1650+
assert len(out) == 66
1651+
assert out.startswith('02') or out.startswith('03')
1652+
1653+
# Test detection of mnemonic with passphrase
1654+
os.remove(hsm_path)
1655+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
1656+
master_fd, slave_fd = os.openpty()
1657+
hsmtool.start(stdin=slave_fd)
1658+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1659+
write_all(master_fd, "ritual idle hat sunny universe pluck key alpha wing cake have wedding\n".encode("utf-8"))
1660+
hsmtool.wait_for_log(r"Enter your passphrase:")
1661+
write_all(master_fd, "test_passphrase\n".encode("utf-8"))
1662+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1663+
1664+
# Test getnodeid works with passphrase-protected mnemonic format
1665+
cmd_line = ["tools/hsmtool", "getnodeid", hsm_path]
1666+
proc = subprocess.Popen(cmd_line, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
1667+
stdout, stderr = proc.communicate(input=b"test_passphrase\n")
1668+
assert proc.returncode == 0
1669+
node_id = stdout.decode("utf8").strip()
1670+
assert len(node_id) == 66
1671+
1672+
1673+
def test_hsmtool_generatehsm_file_exists_error(node_factory):
1674+
"""Test that generatehsm fails if file already exists"""
1675+
l1 = node_factory.get_node(start=False)
1676+
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "hsm_secret")
1677+
1678+
# File already exists from node creation
1679+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
1680+
master_fd, slave_fd = os.openpty()
1681+
hsmtool.start(stdin=slave_fd)
1682+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 2 # ERROR_USAGE
1683+
hsmtool.is_in_log(r"hsm_secret file.*already exists")
1684+
1685+
1686+
def test_hsmtool_all_commands_work_with_mnemonic_formats(node_factory):
1687+
"""Test that all hsmtool commands work with mnemonic formats"""
1688+
l1 = node_factory.get_node(start=False)
1689+
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "hsm_secret")
15251690
os.remove(hsm_path)
1526-
subprocess.check_output(["tools/hsmtool",
1527-
"generatehsm", hsm_path,
1528-
"en",
1529-
"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"])
1530-
assert open(hsm_path, "rb").read().hex() == "5eb00bbddcf069084889a8ab9155568165f5c453ccb85e70811aaed6f6da5fc1"
15311691

1532-
# Including passphrase
1692+
# Create a mnemonic-based hsm_secret (no passphrase for simplicity)
1693+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
1694+
master_fd, slave_fd = os.openpty()
1695+
hsmtool.start(stdin=slave_fd)
1696+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1697+
write_all(master_fd, "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\n".encode("utf-8"))
1698+
hsmtool.wait_for_log(r"Enter your passphrase:")
1699+
write_all(master_fd, "\n".encode("utf-8"))
1700+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1701+
1702+
# Test various commands work with mnemonic format
1703+
test_commands = [
1704+
(["getnodeid", hsm_path], lambda out: len(out.strip()) == 66),
1705+
(["getcodexsecret", hsm_path, "test"], lambda out: out.strip().startswith("cl")),
1706+
(["makerune", hsm_path], lambda out: len(out.strip()) > 0),
1707+
(["dumponchaindescriptors", hsm_path], lambda out: "#" in out), # Should have checksums
1708+
]
1709+
1710+
for cmd_args, validator in test_commands:
1711+
cmd_line = ["tools/hsmtool"] + cmd_args
1712+
out = subprocess.check_output(cmd_line).decode("utf8")
1713+
assert validator(out), f"Command {cmd_args[0]} failed validation"
1714+
1715+
1716+
def test_hsmtool_deterministic_node_ids(node_factory):
1717+
"""Test that same mnemonic+passphrase always produces same node ID"""
1718+
l1 = node_factory.get_node(start=False)
1719+
hsm_path = os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "hsm_secret")
1720+
1721+
# Test with specific mnemonic and passphrase
1722+
mnemonic = "ritual idle hat sunny universe pluck key alpha wing cake have wedding"
1723+
passphrase = "test_passphrase"
1724+
1725+
# Create first hsm_secret
15331726
os.remove(hsm_path)
1534-
subprocess.check_output(["tools/hsmtool",
1535-
"generatehsm", hsm_path,
1536-
"en",
1537-
"ritual idle hat sunny universe pluck key alpha wing cake have wedding",
1538-
"This is actually not a passphrase"])
1727+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
1728+
master_fd, slave_fd = os.openpty()
1729+
hsmtool.start(stdin=slave_fd)
1730+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1731+
write_all(master_fd, f"{mnemonic}\n".encode("utf-8"))
1732+
hsmtool.wait_for_log(r"Enter your passphrase:")
1733+
write_all(master_fd, f"{passphrase}\n".encode("utf-8"))
1734+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1735+
1736+
# Get node ID
1737+
cmd_line = ["tools/hsmtool", "getnodeid", hsm_path]
1738+
proc = subprocess.Popen(cmd_line, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
1739+
stdout, stderr = proc.communicate(input=f"{passphrase}\n".encode("utf-8"))
1740+
first_node_id = stdout.decode("utf8").strip()
1741+
1742+
# Create second hsm_secret with same credentials
1743+
os.remove(hsm_path)
1744+
hsmtool = HsmTool(node_factory.directory, "generatehsm", hsm_path)
1745+
master_fd, slave_fd = os.openpty()
1746+
hsmtool.start(stdin=slave_fd)
1747+
hsmtool.wait_for_log(r"Introduce your BIP39 word list")
1748+
write_all(master_fd, f"{mnemonic}\n".encode("utf-8"))
1749+
hsmtool.wait_for_log(r"Enter your passphrase:")
1750+
write_all(master_fd, f"{passphrase}\n".encode("utf-8"))
1751+
assert hsmtool.proc.wait(WAIT_TIMEOUT) == 0
1752+
1753+
# Get node ID again
1754+
cmd_line = ["tools/hsmtool", "getnodeid", hsm_path]
1755+
proc = subprocess.Popen(cmd_line, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
1756+
stdout, stderr = proc.communicate(input=f"{passphrase}\n".encode("utf-8"))
1757+
second_node_id = stdout.decode("utf8").strip()
1758+
1759+
# Should be identical
1760+
assert first_node_id == second_node_id == '02244b73339edd004bc6dfbb953a87984c88e9e7c02ca14ef6ec593ca6be622ba7'
15391761

1540-
l1.start()
1541-
assert l1.info['id'] == '02244b73339edd004bc6dfbb953a87984c88e9e7c02ca14ef6ec593ca6be622ba7'
1542-
l1.stop()
15431762

15441763

15451764
# this test does a 'listtransactions' on a yet unconfirmed channel

0 commit comments

Comments
 (0)