mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
gossipd: don't charge ourselves fees when calculating route.
This means there's now a semantic difference between the default `fromid` and setting `fromid` explicitly to our own node_id. In the default case, it means we don't charge ourselves fees on the route. This means we can spend the full channel balance. We still want to consider the pricing of local channels, however: there's a *reason* to discount one over another, and that is to bias things. So we add the first-hop fee to the *risk* value instead. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -307,7 +307,7 @@ static struct command_result *json_getroute(struct command *cmd,
|
||||
p_req("msatoshi", param_msat, &msat),
|
||||
p_req("riskfactor", param_double, &riskfactor),
|
||||
p_opt_def("cltv", param_number, &cltv, 9),
|
||||
p_opt_def("fromid", param_node_id, &source, ld->id),
|
||||
p_opt("fromid", param_node_id, &source),
|
||||
p_opt_def("fuzzpercent", param_percent, &fuzz, 5.0),
|
||||
p_opt("exclude", param_array, &excludetok),
|
||||
p_opt_def("maxhops", param_number, &max_hops,
|
||||
|
||||
Reference in New Issue
Block a user