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

Function main

common/test/run-splice_script.c:61–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60
61int main(int argc, char *argv[])
62{
63 size_t i, len;
64 const char *str;
65 struct splice_script_error *error;
66 struct splice_script_result **result, **final;
67 jsmntok_t *toks;
68 struct splice_script_chan **channels;
69 const char *script;
70 struct splice_script_result *expect;
71
72 common_setup(argv[0]);
73
74 i = 0;
75 channels = tal_arr(tmpctx, struct splice_script_chan*, 0);
76 /* A */
77 tal_arr_expand(&channels, tal(channels, struct splice_script_chan));
78 set_node_id(channels[i], "0399069f1693fd89a453f0caf03ee36b6f6c8abaa7ef778d3e2bcc7c2b44120100");
79 set_chan_id(channels[i], "f5699c3d5302e4486c83ef9d0f2d12a969ab41ccc9301bd042c50760a87b2700");
80 i++;
81 /* B */
82 tal_arr_expand(&channels, tal(channels, struct splice_script_chan));
83 set_node_id(channels[i], "0393069f1693fd89a453f0caf03ee36b6f6c8abaa7ef778d3e2bcc7c2b44120101");
84 set_chan_id(channels[i], "f5699c3d5302e4486c83ef9d0f2d12a969ab41ccc9301bd042c50760a87b2701");
85 i++;
86 /* C */
87 tal_arr_expand(&channels, tal(channels, struct splice_script_chan));
88 set_node_id(channels[i], "0393069f1693fd89a453f0caf03ee36b6f6c8abaa7ef778d3e2bcc7c2b44120101");
89 set_chan_id(channels[i], "f5699c3d5302e4486c83ef9d0f2d12a969ab41ccc9301bd042c50760a87b2702");
90 i++;
91 /* D */
92 tal_arr_expand(&channels, tal(channels, struct splice_script_chan));
93 set_node_id(channels[i], "0393069f1693fd89a453f0caf03ee36b6f6c8abaa7ef778d3e2bcc7c2b44120101");
94 set_chan_id(channels[i], "f5699c3d5302e4486c83ef9d0f2d12a969ab41ccc9301bd042c50760a87b2703");
95 i++;
96 /* E */
97 tal_arr_expand(&channels, tal(channels, struct splice_script_chan));
98 set_node_id(channels[i], "0393069f1693fd89a453f0caf03ee36b6f6c8abaa7ef778d3e2bcc7c2b44120101");
99 set_chan_id(channels[i], "f5699c3d5302e4486c83ef9d0f2d12a969ab41ccc9301bd042c50760a87b2704");
100 i++;
101 /* F */
102 tal_arr_expand(&channels, tal(channels, struct splice_script_chan));
103 set_node_id(channels[i], "0393069f1693fd89a453f0caf03ee36b6f6c8abaa7ef778d3e2bcc7c2b44120101");
104 set_chan_id(channels[i], "f5699c3d5302e4486c83ef9d0f2d12a969ab41ccc9301bd042c50760a87b2705");
105 i++;
106 /* G */
107 tal_arr_expand(&channels, tal(channels, struct splice_script_chan));
108 set_node_id(channels[i], "0394069f1693fd89a453f0caf03ee36b6f6c8abaa7ef778d3e2bcc7c2b44120101");
109 set_chan_id(channels[i], "f5699c3d5302e4486c83ef9d0f2d12a969ab41ccc9301bd042c50760a87b2706");
110 i++;
111 /* H */
112 tal_arr_expand(&channels, tal(channels, struct splice_script_chan));
113 set_node_id(channels[i], "0394069f1693fd89a453f0caf03ee36b6f6c8abaa7ef778d3e2bcc7c2b44120101");
114 set_chan_id(channels[i], "f4699c3d5302e4486c83ef9d0f2d12a969ab41ccc9301bd042c50760a87b2700");
115 i++;
116 /* I */
117 tal_arr_expand(&channels, tal(channels, struct splice_script_chan));
118 set_node_id(channels[i], "0394069f1693fd89a453f0caf03ee36b6f6c8abaa7ef778d3e2bcc7c2b44120102");

Callers

nothing calls this directly

Calls 15

common_setupFunction · 0.85
set_chan_idFunction · 0.85
chainparams_for_networkFunction · 0.85
parse_splice_scriptFunction · 0.85
common_shutdownFunction · 0.85
abortFunction · 0.85
new_json_streamFunction · 0.85
splice_to_jsonFunction · 0.85
json_out_contentsFunction · 0.85
json_parse_simpleFunction · 0.85
json_to_spliceFunction · 0.85

Tested by

no test coverage detected