Skip to content

Commit a6c2cd7

Browse files
committed
plugins/renepay: clean up unused fmt_payflows.
Signed-off-by: Rusty Russell <[email protected]>
1 parent eef5748 commit a6c2cd7

File tree

2 files changed

+0
-69
lines changed

2 files changed

+0
-69
lines changed

plugins/renepay/pay_flow.c

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* Routines to get suitable pay_flow array from pay constraints */
22
#include "config.h"
3-
#include <ccan/json_out/json_out.h>
43
#include <ccan/tal/str/str.h>
54
#include <common/gossmap.h>
65
#include <common/pseudorand.h>
@@ -548,71 +547,6 @@ const char *flow_path_to_str(const tal_t *ctx, const struct pay_flow *flow)
548547
return s;
549548
}
550549

551-
const char* fmt_payflows(const tal_t *ctx,
552-
struct pay_flow ** flows)
553-
{
554-
struct json_out *jout = json_out_new(ctx);
555-
json_out_start(jout, NULL, '{');
556-
json_out_start(jout,"Pay_flows",'[');
557-
558-
for(size_t i=0;i<tal_count(flows);++i)
559-
{
560-
struct pay_flow *f = flows[i];
561-
json_out_start(jout,NULL,'{');
562-
563-
json_out_add(jout,"success_prob",false,"%.2lf",f->success_prob);
564-
565-
json_out_start(jout,"path_scids",'[');
566-
for(size_t j=0;j<tal_count(f->path_scids);++j)
567-
{
568-
json_out_add(jout,NULL,true,"%s",
569-
type_to_string(ctx,struct short_channel_id,&f->path_scids[j]));
570-
}
571-
json_out_end(jout,']');
572-
573-
json_out_start(jout,"path_dirs",'[');
574-
for(size_t j=0;j<tal_count(f->path_dirs);++j)
575-
{
576-
json_out_add(jout,NULL,false,"%d",f->path_dirs[j]);
577-
}
578-
json_out_end(jout,']');
579-
580-
json_out_start(jout,"amounts",'[');
581-
for(size_t j=0;j<tal_count(f->amounts);++j)
582-
{
583-
json_out_add(jout,NULL,true,"%s",
584-
type_to_string(ctx,struct amount_msat,&f->amounts[j]));
585-
}
586-
json_out_end(jout,']');
587-
588-
json_out_start(jout,"cltv_delays",'[');
589-
for(size_t j=0;j<tal_count(f->cltv_delays);++j)
590-
{
591-
json_out_add(jout,NULL,false,"%d",f->cltv_delays[j]);
592-
}
593-
json_out_end(jout,']');
594-
595-
json_out_start(jout,"path_nodes",'[');
596-
for(size_t j=0;j<tal_count(f->path_nodes);++j)
597-
{
598-
json_out_add(jout,NULL,true,"%s",
599-
type_to_string(ctx,struct node_id,&f->path_nodes[j]));
600-
}
601-
json_out_end(jout,']');
602-
603-
json_out_end(jout,'}');
604-
}
605-
606-
json_out_end(jout,']');
607-
json_out_end(jout, '}');
608-
json_out_direct(jout, 1)[0] = '\n';
609-
json_out_direct(jout, 1)[0] = '\0';
610-
json_out_finished(jout);
611-
612-
size_t len;
613-
return json_out_contents(jout,&len);
614-
}
615-
616550
/* How much does this flow deliver to destination? */
617551
struct amount_msat payflow_delivered(const struct pay_flow *flow)
618552
{

plugins/renepay/pay_flow.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,6 @@ struct pf_result *pay_flow_succeeded(struct pay_flow *pf STEALS,
134134
/* Formatting helpers */
135135
const char *flow_path_to_str(const tal_t *ctx, const struct pay_flow *flow);
136136

137-
const char* fmt_payflows(const tal_t *ctx,
138-
struct pay_flow ** flows);
139-
140137
/* How much does this flow deliver to destination? */
141138
struct amount_msat payflow_delivered(const struct pay_flow *flow);
142139

0 commit comments

Comments
 (0)