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

Function psbt_new_output_serial

common/psbt_open.c:385–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385u64 psbt_new_output_serial(struct wally_psbt *psbt, enum tx_role role)
386{
387 u64 serial_id;
388
389 while ((serial_id = get_random_serial(role)) &&
390 psbt_find_serial_output(psbt, serial_id) != -1) {
391 /* keep going; */
392 }
393
394 return serial_id;
395}
396
397bool psbt_has_required_fields(struct wally_psbt *psbt)
398{

Callers 1

psbt_add_serialsFunction · 0.85

Calls 2

get_random_serialFunction · 0.85
psbt_find_serial_outputFunction · 0.85

Tested by

no test coverage detected