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

Function feerate_max

lightningd/chaintopology.c:1188–1209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1186}
1187
1188u32 feerate_max(struct lightningd *ld, bool *unknown)
1189{
1190 const struct chain_topology *topo = ld->topology;
1191 u32 max = 0;
1192
1193 if (unknown)
1194 *unknown = false;
1195
1196 for (size_t i = 0; i < ARRAY_SIZE(topo->feerates); i++) {
1197 const size_t num_feerates = tal_count(topo->feerates[i]);
1198 for (size_t j = 0; j < num_feerates; j++) {
1199 if (topo->feerates[i][j].rate > max)
1200 max = topo->feerates[i][j].rate;
1201 }
1202 }
1203 if (!max) {
1204 if (unknown)
1205 *unknown = true;
1206 return UINT_MAX;
1207 }
1208 return max * topo->ld->config.max_fee_multiplier;
1209}
1210
1211u32 default_locktime(const struct chain_topology *topo)
1212{

Callers 9

rbf_got_offerFunction · 0.85
accepter_got_offerFunction · 0.85
splice_feerateFunction · 0.85
json_feeratesFunction · 0.85
peer_start_openingdFunction · 0.85
default_feerateFunction · 0.85
channel_update_feeratesFunction · 0.85
peer_start_channeldFunction · 0.85
json_dev_feerateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected