1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
;
;
/**
* optimal_payment_flow - API for min cost flow function(s).
* @ctx: context to allocate returned flows from
* @gossmap: the gossip map
* @source: the source to start from
* @target: the target to pay
* @chan_extra_map: hashtable of extra per-channel information
* @disabled: NULL, or a bitmap by channel index of channels not to use.
* @amount: the amount we want to reach @target
*
* @max_fee: the maximum allowed in fees
*
* @min_probability: minimum probability accepted
*
* @delay_feefactor converts 1 block delay into msat, as if it were an additional
* fee. So if a CLTV delay on a node is 5 blocks, that's treated as if it
* were a fee of 5 * @delay_feefactor.
*
* @base_fee_penalty: factor to compute additional proportional cost from each
* unit of base fee. So #base_fee_penalty will be added to the effective
* proportional fee for each msat of base fee.
*
* effective_ppm = proportional_fee + base_fee_msat * base_fee_penalty
*
* @prob_cost_factor: factor used to monetize the probability cost. It is
* defined as the number of ppm (parts per million of the total payment) we
* are willing to pay to improve the probability of success by 0.1%.
*
* k_microsat = floor(1000*prob_cost_factor * payment_sat)
*
* this k is used to compute a prob. cost in units of microsats
*
* cost(payment) = - k_microsat * log Prob(payment)
*
* Return a series of subflows which deliver amount to target, or NULL.
*/
struct flow **;
/* LIGHTNING_PLUGINS_RENEPAY_MCF_H */