MCPcopy Create free account
hub / github.com/ElementsProject/lightning / splice_dryrun

Function splice_dryrun

plugins/spender/splice.c:2000–2017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1998}
1999
2000static struct command_result *splice_dryrun(struct command *cmd,
2001 struct splice_cmd *splice_cmd)
2002{
2003 char **lines;
2004 unsigned int i;
2005 struct json_stream *response;
2006 const char *str;
2007
2008 response = jsonrpc_stream_success(cmd);
2009 json_array_start(response, "dryrun");
2010
2011 str = splicearr_to_string(response, splice_cmd->actions);
2012 lines = tal_strsplit(response, take(str), "\n", STR_NO_EMPTY);
2013 for (i = 0; lines[i] != NULL; i++)
2014 json_add_string(response, NULL, lines[i]);
2015 json_array_end(response);
2016 return command_finished(cmd, response);
2017}
2018
2019static struct command_result *handle_splice_cmd(struct command *cmd,
2020 struct splice_cmd *splice_cmd)

Callers 1

handle_splice_cmdFunction · 0.85

Calls 6

json_array_startFunction · 0.85
splicearr_to_stringFunction · 0.85
json_array_endFunction · 0.85
jsonrpc_stream_successFunction · 0.50
json_add_stringFunction · 0.50
command_finishedFunction · 0.50

Tested by

no test coverage detected