Skip to content

Commit

Permalink
Repro: cln-plugin cannot subscribe to wildcard "*"
Browse files Browse the repository at this point in the history
This test reproduces a bug in the `cln-plugin`-crate.
Core Lightning supports a wildcard `*` that plugins can use to
subscribe to all notifications.

However, `cln-plugin` does not support this case.
It allows the developer to subscribe `*`.
But the plug-in crashes when the first notification is received
  • Loading branch information
ErikDeSmedt committed Mar 25, 2024
1 parent 0fe3d9c commit c2e71f2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_cln_rs.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,16 @@ def test_grpc_decode(node_factory):
string=inv.bolt11
))
print(res)


@pytest.mark.xfail(strict=True)
def test_rust_plugin_subscribe_wildcard(node_factory):
""" Creates a plugin that loads the subscribe_wildcard plugin
"""
bin_path = Path.cwd() / "target" / RUST_PROFILE / "examples" / "cln-subscribe-wildcard"
l1 = node_factory.get_node(options={"plugin": bin_path})
l2 = node_factory.get_node()

l2.connect(l1)

l1.daemon.wait_for_log("Received notification connect")

0 comments on commit c2e71f2

Please sign in to comment.