Browse Source

gossipd: temporarily disable fuzz in routing.

This allows precise comparison between Dijkstra and Bellman-Ford without
worrying about fuzz.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
pr-2587
Rusty Russell 6 years ago
parent
commit
4d84a436f5
  1. 11
      gossipd/routing.c

11
gossipd/routing.c

@ -550,17 +550,6 @@ static void bfg_one_edge(struct node *node,
double fee_scale = 1.0; double fee_scale = 1.0;
const struct half_chan *c = &chan->half[idx]; const struct half_chan *c = &chan->half[idx];
if (fuzz != 0.0) {
u64 h = siphash24(base_seed, &chan->scid, sizeof(chan->scid));
/* Scale fees for this channel */
/* rand = (h / UINT64_MAX) random number between 0.0 -> 1.0
* 2*fuzz*rand random number between 0.0 -> 2*fuzz
* 2*fuzz*rand - fuzz random number between -fuzz -> +fuzz
*/
fee_scale = 1.0 + (2.0 * fuzz * h / UINT64_MAX) - fuzz;
}
for (h = 0; h < max_hops; h++) { for (h = 0; h < max_hops; h++) {
struct node *src; struct node *src;
struct amount_msat total, risk; struct amount_msat total, risk;

Loading…
Cancel
Save