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

Function change_serials

common/test/run-psbt_diff.c:115–130  ·  view source on GitHub ↗

Try changing up the serial ids */

Source from the content-addressed store, hash-verified

113
114/* Try changing up the serial ids */
115static void change_serials(void)
116{
117 struct wally_psbt *psbt;
118
119 psbt = create_psbt(tmpctx, 1, 1, 0);
120 add_in_out_with_serial(psbt, 10, 1);
121
122 psbt_output_set_serial_id(psbt, &psbt->outputs[0], 2);
123 assert(psbt_find_serial_output(psbt, 2) == 0);
124 assert(psbt_find_serial_output(psbt, 10) == -1);
125
126 psbt_input_set_serial_id(psbt, &psbt->inputs[0], 4);
127 assert(psbt_find_serial_input(psbt, 4) == 0);
128 assert(psbt_find_serial_input(psbt, 10) == -1);
129
130}
131
132static void check_psbt_comparison(void)
133{

Callers 1

mainFunction · 0.85

Calls 6

create_psbtFunction · 0.85
add_in_out_with_serialFunction · 0.85
psbt_find_serial_outputFunction · 0.85
psbt_input_set_serial_idFunction · 0.85
psbt_find_serial_inputFunction · 0.85

Tested by

no test coverage detected