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

Pass typed plugin option data to plugin in init #3582

Merged
merged 7 commits into from
Mar 10, 2020

Commits on Mar 8, 2020

  1. pyln-testing: save stderr logs for checking

    just for convenience's sake
    niftynei committed Mar 8, 2020
    Configuration menu
    Copy the full SHA
    c2a53b1 View commit details
    Browse the repository at this point in the history
  2. pyln-testing: add flag 'expect_fail' to node factory get_node

    if the node fails to start (and we're expecting it to) return to us the
    node object anyway
    
    we also signal to collect all of its stderr logs by setting stderr
    on the tailableproc that backs the node
    niftynei committed Mar 8, 2020
    Configuration menu
    Copy the full SHA
    ba49d03 View commit details
    Browse the repository at this point in the history
  3. plugins: pass back opts as indicated type. fixes ElementsProject#3577

    Changelog-Fixed: Plugins: if an option has a type int or bool, return the option as that type to the plugin's init
    niftynei committed Mar 8, 2020
    Configuration menu
    Copy the full SHA
    a8e9324 View commit details
    Browse the repository at this point in the history
  4. pyln: enforce types of options

    we loosely enforce that the specified type must be one of the listed
    options. you can still cause an error because we're not checking the
    default value you're passing in ...
    
    not sure if this is totally necessary, should we jsut let clightning
    enforce the input?
    niftynei committed Mar 8, 2020
    Configuration menu
    Copy the full SHA
    a413dc5 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2020

  1. plugins: use stricter parsing for option values

    also: convert the stored int value from 'int' to 's64'
    
    atoi fails silently, returning a zero. instead we use the more robust
    strtoll which will allow us fail with an error.
    
    we also make the parsing for bools stricter, only allowing plausibly
    boolean values to parse.
    niftynei committed Mar 9, 2020
    Configuration menu
    Copy the full SHA
    b1b8fcb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dc70867 View commit details
    Browse the repository at this point in the history
  3. plugin: add in deprecated_api behavior and test

    we also check that the node isn't running now, for extra pedancity
    niftynei committed Mar 9, 2020
    Configuration menu
    Copy the full SHA
    e9239d9 View commit details
    Browse the repository at this point in the history