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

Function update_feerates

lightningd/channel_control.c:27–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include <wally_bip32.h>
26
27static void update_feerates(struct lightningd *ld, struct channel *channel)
28{
29 u8 *msg;
30 u32 feerate = unilateral_feerate(ld->topology);
31
32 /* Nothing to do if we don't know feerate. */
33 if (!feerate)
34 return;
35
36 log_debug(ld->log,
37 "update_feerates: feerate = %u, min=%u, max=%u, penalty=%u",
38 feerate,
39 feerate_min(ld, NULL),
40 feerate_max(ld, NULL),
41 try_get_feerate(ld->topology, FEERATE_PENALTY));
42
43 msg = towire_channeld_feerates(NULL, feerate,
44 feerate_min(ld, NULL),
45 feerate_max(ld, NULL),
46 try_get_feerate(ld->topology, FEERATE_PENALTY));
47 subd_send_msg(channel->owner, take(msg));
48}
49
50static void try_update_feerates(struct lightningd *ld, struct channel *channel)
51{

Callers 1

try_update_feeratesFunction · 0.70

Calls 5

unilateral_feerateFunction · 0.85
feerate_minFunction · 0.85
feerate_maxFunction · 0.85
try_get_feerateFunction · 0.70
subd_send_msgFunction · 0.70

Tested by

no test coverage detected