Skip to content

Commit

Permalink
pyln-client: restore backwards compatibility with CLN prior to 24.08
Browse files Browse the repository at this point in the history
24.05 and before requires a "description" field.  We should not have removed it here
until that was EOL!

Changelog-Fixed: pyln-client: plugins now compatible with CLN <= 24.05 (broken in 24.08)
Reported-by: Christian Decker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Nov 22, 2024
1 parent d5c0d21 commit 2c062be
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion contrib/pyln-client/pyln/client/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,16 @@ def _getmanifest(self, **kwargs) -> JSONType:
doc = "Undocumented RPC method from a plugin."
doc = re.sub('\n+', ' ', doc)

# For compatibility with lightningd prior to 24.08, we must
# provide a description. Ignored by 24.08 onwards,
description = method.description
if description is None:
description = ""

methods.append({
'name': method.name,
'usage': method.get_usage()
'usage': method.get_usage(),
'description': description,
})

manifest = {
Expand Down

0 comments on commit 2c062be

Please sign in to comment.