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

Function unilateral_feerate

lightningd/chaintopology.c:639–658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639u32 unilateral_feerate(struct chain_topology *topo, bool option_anchors)
640{
641 if (topo->ld->force_feerates)
642 return topo->ld->force_feerates[FEERATE_UNILATERAL_CLOSE];
643
644 if (option_anchors) {
645 /* We can lowball fee, since we can CPFP with anchors */
646 u32 feerate = feerate_for_deadline(topo, 100);
647 if (!feerate)
648 return 0; /* Don't know */
649 /* We still need to get into the mempool, so use 5 sat/byte */
650 if (feerate < 1250)
651 return 1250;
652 return feerate;
653 }
654
655 return smoothed_feerate_for_deadline(topo,
656 conversions[FEERATE_UNILATERAL_CLOSE].blockcount)
657 * topo->ld->config.commit_fee_percent / 100;
658}
659
660u32 delayed_to_us_feerate(struct chain_topology *topo)
661{

Callers 7

openchannel_initFunction · 0.70
json_queryratesFunction · 0.70
json_feeratesFunction · 0.70
peer_start_closingdFunction · 0.70
param_feerate_uncheckedFunction · 0.70
json_fundchannel_startFunction · 0.70
default_feerateFunction · 0.70

Calls 2

feerate_for_deadlineFunction · 0.70

Tested by

no test coverage detected