Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyln: Plugin methods and hooks refuse to set results twice #4094

Merged

Commits on Oct 13, 2020

  1. pyln: Plugin methods and hooks refuse to set results twice

    We had a couple of instances where a plugin would be killed by `lightningd`
    because we were returning a result of an exception twice, and it was hard to
    trace down the logic error in the user plugin that caused that. This patch
    adds a traceback the first time we return a result/exception, and raise an
    exception with a stacktrace of the first termination when a second one comes
    in.
    
    This can still terminate the plugin, but the programmer gets a clear
    indication where the result was set, and can potentially even recover from it.
    
    Changelog-Added: pyln: Plugin method and hook requests prevent the plugin developer from accidentally setting the result multiple times, and will raise an exception detailing where the result was first set.
    cdecker committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    8dee4eb View commit details
    Browse the repository at this point in the history