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

Function change_serials

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

Try changing up the serial ids */

Source from the content-addressed store, hash-verified

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

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