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

Function handle_feerates

tests/plugins/channeld_fakenet.c:960–981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

958}
959
960static void handle_feerates(struct info *info, const u8 *inmsg)
961{
962 u32 feerate, min, max, penalty, opening, splicing;
963
964 if (!fromwire_channeld_feerates(inmsg, &feerate,
965 &min, &max, &penalty, &opening,
966 &splicing))
967 master_badmsg(WIRE_CHANNELD_FEERATES, inmsg);
968
969 /* BOLT #2:
970 *
971 * The node _responsible_ for paying the Bitcoin fee:
972 * - SHOULD send `update_fee` to ensure the current fee rate is
973 * sufficient (by a significant margin) for timely processing of the
974 * commitment transaction.
975 */
976 if (info->channel->opener == LOCAL) {
977 if (!channel_update_feerate(info->channel, feerate)) {
978 abort();
979 }
980 }
981}
982
983static void handle_blockheight(struct info *info, const u8 *inmsg)
984{

Callers 1

recv_reqFunction · 0.70

Calls 3

channel_update_feerateFunction · 0.85
abortFunction · 0.85
master_badmsgFunction · 0.50

Tested by

no test coverage detected