mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pytest: don't use command_success_str in test_libplugin.c
result should *always* be an object. This allows it to add fields without breaking the API. A command which returns "result" as a string is living in sin. This changes one of the two callers of "command_success_str". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -22,7 +22,7 @@ static struct command_result *json_helloworld(struct command *cmd,
|
||||
if (!name)
|
||||
name = name_option ? name_option : tal_strdup(tmpctx, "world");
|
||||
|
||||
return command_success_str(cmd, tal_fmt(tmpctx, "hello %s", name));
|
||||
return command_success(cmd, json_out_obj(cmd, "hello", name));
|
||||
}
|
||||
|
||||
static struct command_result *
|
||||
|
||||
Reference in New Issue
Block a user