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

Function feerate_same_or_better

channeld/channeld.c:730–741  ·  view source on GitHub ↗

We don't get upset if they're outside the range, as long as they're * improving (or at least, not getting worse!). */

Source from the content-addressed store, hash-verified

728/* We don't get upset if they're outside the range, as long as they're
729 * improving (or at least, not getting worse!). */
730static bool feerate_same_or_better(const struct channel *channel,
731 u32 feerate, u32 feerate_min, u32 feerate_max)
732{
733 u32 current = channel_feerate(channel, LOCAL);
734
735 /* Too low? But is it going upwards? */
736 if (feerate < feerate_min)
737 return feerate >= current;
738 if (feerate > feerate_max)
739 return feerate <= current;
740 return true;
741}
742
743static void handle_peer_feechange(struct peer *peer, const u8 *msg)
744{

Callers 1

handle_peer_feechangeFunction · 0.85

Calls 1

channel_feerateFunction · 0.85

Tested by

no test coverage detected