renepay: more cleanups

- adopt "const <type> *"convention
- remove use_shadow option for some pyln tests
- show prob. information of flows into paynotes
- show prob. of success of entire payment flow in paynotes
- minflow: We were not releasing the memory of flow arrays when replacing
  them with a new canditate.
- use memleak_scan_obj in memleak_check
- replace u64 with size_t

Signed-off-by: Lagrang3 <eduardo.quintana@pm.me>
This commit is contained in:
Lagrang3
2023-07-31 11:21:25 +09:30
committed by Rusty Russell
parent b5da85e85d
commit 3024afe524
11 changed files with 62 additions and 60 deletions

View File

@@ -630,7 +630,7 @@ static void test_flow_complete(void)
struct amount_msat deliver;
// flow 1->2
F->path = tal_arr(F,struct gossmap_chan const *,1);
F->path = tal_arr(F,const struct gossmap_chan *,1);
F->dirs = tal_arr(F,int,1);
F->path[0]=gossmap_find_chan(gossmap,&scid12);
F->dirs[0]=0;
@@ -640,7 +640,7 @@ static void test_flow_complete(void)
assert(fabs(F->success_prob - 0.5)<eps);
// flow 3->4->5
F->path = tal_arr(F,struct gossmap_chan const *,2);
F->path = tal_arr(F,const struct gossmap_chan *,2);
F->dirs = tal_arr(F,int,2);
F->path[0]=gossmap_find_chan(gossmap,&scid34);
F->path[1]=gossmap_find_chan(gossmap,&scid45);
@@ -652,7 +652,7 @@ static void test_flow_complete(void)
assert(fabs(F->success_prob - 1.)<eps);
// flow 2->3->4->5
F->path = tal_arr(F,struct gossmap_chan const *,3);
F->path = tal_arr(F,const struct gossmap_chan *,3);
F->dirs = tal_arr(F,int,3);
F->path[0]=gossmap_find_chan(gossmap,&scid23);
F->path[1]=gossmap_find_chan(gossmap,&scid34);
@@ -666,7 +666,7 @@ static void test_flow_complete(void)
assert(fabs(F->success_prob - 1. + 250.087534/2000)<eps);
// flow 1->2->3->4->5
F->path = tal_arr(F,struct gossmap_chan const *,4);
F->path = tal_arr(F,const struct gossmap_chan *,4);
F->dirs = tal_arr(F,int,4);
F->path[0]=gossmap_find_chan(gossmap,&scid12);
F->path[1]=gossmap_find_chan(gossmap,&scid23);