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

Notification support #4046

Merged
merged 13 commits into from
Oct 23, 2020

Commits on Oct 22, 2020

  1. lightningd: clean up close code now force is always true.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    07cc1e8 View commit details
    Browse the repository at this point in the history
  2. common: add routines for log level names.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    54b4412 View commit details
    Browse the repository at this point in the history
  3. ccan: update to latest version, get json_out_finished update.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    7a9ef82 View commit details
    Browse the repository at this point in the history
  4. common/json_stream: add generic double-cr helper.

    And make caller of json_stream_forward_change_id use it, since
    we're going to reuse that.
    
    Also call json_out_finished here, so next object doesn't have a ","
    prepended.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    913a137 View commit details
    Browse the repository at this point in the history
  5. JSON-RPC: notifications command.

    This lets callers enable notifications; we won't send any if they don't.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Added: JSON-RPC: `notifications` command to enable notifications.
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    01cc152 View commit details
    Browse the repository at this point in the history
  6. lightningd: forward notifications from plugins if enabled.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    9bc1fbd View commit details
    Browse the repository at this point in the history
  7. libplugin: support for sending notifications.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Added: libplugin: routines to send notification updates and progress.
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    daafe9c View commit details
    Browse the repository at this point in the history
  8. libplugin: ignore incoming notifications.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    7987be1 View commit details
    Browse the repository at this point in the history
  9. pyln: handle (ignore) notifications, and add notify_msg to send them.

    We also sanity check that response id matches our request.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Added: pyln: pyln.client handles and can send progress notifications.
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    b6fd3dd View commit details
    Browse the repository at this point in the history
  10. lightning-cli: print notifications (with '# ' prefix) if received.

    This can be suppressed with -N.
    
    Note that we wull get an error with older lightningd, but we ignore it
    anyway.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Added: cli: print notifications and progress bars if commands provide them.
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    034cc98 View commit details
    Browse the repository at this point in the history
  11. pytest: add notifications to tests.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    8531c89 View commit details
    Browse the repository at this point in the history
  12. lightningd: infrastructure for internal notifications.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    a1b42f7 View commit details
    Browse the repository at this point in the history
  13. close: add notification for slow closes.

    For compatibility, we only do this if `allow-deprecated-apis` is false
    for now.  Otherwise scripts parsing should use `grep -v '^# '` or
    start using `-N none`.
    
    Changelog-Added: JSON-RPC: `close` now sends notifications for slow closes (if `allow-deprecated-apis`=false)
    Changelog-Deprecated: cli: scripts should filter out '^# ' or use `-N none`, as commands will start returning notifications soon
    Fixes: ElementsProject#3925
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    127b1a1 View commit details
    Browse the repository at this point in the history