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

Simple misc cleanups #4227

Merged

Commits on Nov 27, 2020

  1. common/utils: simple utf8 helpers.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Nov 27, 2020
    Configuration menu
    Copy the full SHA
    9467e0d View commit details
    Browse the repository at this point in the history
  2. common/bolt11: reject bad UTF-8 strings.

    We don't have a problem with them, but callers may; easier to reject bad
    UTF8 here than let the caller fail when it tries to parse output.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Nov 27, 2020
    Configuration menu
    Copy the full SHA
    1b47efd View commit details
    Browse the repository at this point in the history
  3. JSON-RPC: don't allow any strings which aren't valid UTF-8.

    We already do some sanity checks, add this one.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Changed: JSON-RPC: invalid UTF-8 strings now rejected.
    rustyrussell committed Nov 27, 2020
    Configuration menu
    Copy the full SHA
    983cf7f View commit details
    Browse the repository at this point in the history
  4. Makefile: separate check-python targets.

    There's a 60 second delay in one of the contrib tests, and I just want
    to run flake8 on my alterations.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Nov 27, 2020
    Configuration menu
    Copy the full SHA
    135d000 View commit details
    Browse the repository at this point in the history
  5. gossipd: fix memleak.

    Not really a leak, since we eventually process pending, but still:
    
    ```
        **BROKEN** gossipd: MEMLEAK: 0x5562fa63bab8
        **BROKEN** gossipd:   label=wire/peer_exp_wiregen.c:3858:u8[]
        DEBUG   gossipd:   backtrace:
        DEBUG   gossipd:     ccan/ccan/tal/tal.c:442 (tal_alloc_)
        DEBUG   gossipd:     ccan/ccan/tal/tal.c:471 (tal_alloc_arr_)
        DEBUG   gossipd:     wire/peer_exp_wiregen.c:3858 (fromwire_channel_announcement)
        DEBUG   gossipd:     gossipd/routing.c:1706 (handle_channel_announcement)
        DEBUG   gossipd:     gossipd/gossipd.c:238 (handle_channel_announcement_msg)
        DEBUG   gossipd:     gossipd/gossipd.c:444 (peer_msg_in)
        DEBUG   gossipd:     common/daemon_conn.c:31 (handle_read)
        DEBUG   gossipd:     ccan/ccan/io/io.c:59 (next_plan)
        DEBUG   gossipd:     ccan/ccan/io/io.c:407 (do_plan)
        DEBUG   gossipd:     ccan/ccan/io/io.c:417 (io_ready)
        DEBUG   gossipd:     ccan/ccan/io/poll.c:445 (io_loop)
        DEBUG   gossipd:     gossipd/gossipd.c:1730 (main)
        **BROKEN** gossipd:   parents:
        **BROKEN** gossipd:     gossipd/routing.c:1698:struct pending_cannouncement
        **BROKEN** gossipd:     gossipd/gossipd.c:1700:struct daemon
    ```
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Nov 27, 2020
    Configuration menu
    Copy the full SHA
    a5e511c View commit details
    Browse the repository at this point in the history
  6. json: add json_tok_endswith and json_tok_startswith helpers.

    I wanted this for offers, and it's generally useful.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Nov 27, 2020
    Configuration menu
    Copy the full SHA
    1f61bcf View commit details
    Browse the repository at this point in the history
  7. libplugin: add command_hook_success helper.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Nov 27, 2020
    Configuration menu
    Copy the full SHA
    e27422d View commit details
    Browse the repository at this point in the history
  8. common/json: json_add_stringn helper.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Nov 27, 2020
    Configuration menu
    Copy the full SHA
    a211ddb View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2020

  1. ccan: update ccan/utf-8 to reject NULs embedded in strings.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Dec 1, 2020
    Configuration menu
    Copy the full SHA
    75768b5 View commit details
    Browse the repository at this point in the history