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 Feb 23, 2024
1 parent ae927ea commit ce05849
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_cln_rs.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,15 @@ def test_grpc_decode(node_factory):
string=inv.bolt11
))
print(res)


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 ce05849

Please sign in to comment.