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

Function minconf_to_maxheight

wallet/reservation.c:422–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420}
421
422static inline u32 minconf_to_maxheight(u32 minconf, struct lightningd *ld)
423{
424 /* No confirmations is special, we need to disable the check in the
425 * selection */
426 if (minconf == 0)
427 return 0;
428
429 /* Avoid wrapping around and suddenly allowing any confirmed
430 * outputs. Since we can't have a coinbase output, and 0 is taken for
431 * the disable case, we can just clamp to 1. */
432 if (minconf >= ld->topology->tip->height)
433 return 1;
434 return ld->topology->tip->height - minconf + 1;
435}
436
437static struct command_result *param_reserve_num(struct command *cmd,
438 const char *name,

Callers 1

json_fundpsbtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected