| 1186 | } |
| 1187 | |
| 1188 | u32 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 | |
| 1211 | u32 default_locktime(const struct chain_topology *topo) |
| 1212 | { |
no outgoing calls
no test coverage detected