mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
plugins/renepay: clean up unused fmt_payflows.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
eef57488f9
commit
a6c2cd77a1
2 changed files with 0 additions and 69 deletions
|
@ -1,6 +1,5 @@
|
|||
/* Routines to get suitable pay_flow array from pay constraints */
|
||||
#include "config.h"
|
||||
#include <ccan/json_out/json_out.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/gossmap.h>
|
||||
#include <common/pseudorand.h>
|
||||
|
@ -548,71 +547,6 @@ const char *flow_path_to_str(const tal_t *ctx, const struct pay_flow *flow)
|
|||
return s;
|
||||
}
|
||||
|
||||
const char* fmt_payflows(const tal_t *ctx,
|
||||
struct pay_flow ** flows)
|
||||
{
|
||||
struct json_out *jout = json_out_new(ctx);
|
||||
json_out_start(jout, NULL, '{');
|
||||
json_out_start(jout,"Pay_flows",'[');
|
||||
|
||||
for(size_t i=0;i<tal_count(flows);++i)
|
||||
{
|
||||
struct pay_flow *f = flows[i];
|
||||
json_out_start(jout,NULL,'{');
|
||||
|
||||
json_out_add(jout,"success_prob",false,"%.2lf",f->success_prob);
|
||||
|
||||
json_out_start(jout,"path_scids",'[');
|
||||
for(size_t j=0;j<tal_count(f->path_scids);++j)
|
||||
{
|
||||
json_out_add(jout,NULL,true,"%s",
|
||||
type_to_string(ctx,struct short_channel_id,&f->path_scids[j]));
|
||||
}
|
||||
json_out_end(jout,']');
|
||||
|
||||
json_out_start(jout,"path_dirs",'[');
|
||||
for(size_t j=0;j<tal_count(f->path_dirs);++j)
|
||||
{
|
||||
json_out_add(jout,NULL,false,"%d",f->path_dirs[j]);
|
||||
}
|
||||
json_out_end(jout,']');
|
||||
|
||||
json_out_start(jout,"amounts",'[');
|
||||
for(size_t j=0;j<tal_count(f->amounts);++j)
|
||||
{
|
||||
json_out_add(jout,NULL,true,"%s",
|
||||
type_to_string(ctx,struct amount_msat,&f->amounts[j]));
|
||||
}
|
||||
json_out_end(jout,']');
|
||||
|
||||
json_out_start(jout,"cltv_delays",'[');
|
||||
for(size_t j=0;j<tal_count(f->cltv_delays);++j)
|
||||
{
|
||||
json_out_add(jout,NULL,false,"%d",f->cltv_delays[j]);
|
||||
}
|
||||
json_out_end(jout,']');
|
||||
|
||||
json_out_start(jout,"path_nodes",'[');
|
||||
for(size_t j=0;j<tal_count(f->path_nodes);++j)
|
||||
{
|
||||
json_out_add(jout,NULL,true,"%s",
|
||||
type_to_string(ctx,struct node_id,&f->path_nodes[j]));
|
||||
}
|
||||
json_out_end(jout,']');
|
||||
|
||||
json_out_end(jout,'}');
|
||||
}
|
||||
|
||||
json_out_end(jout,']');
|
||||
json_out_end(jout, '}');
|
||||
json_out_direct(jout, 1)[0] = '\n';
|
||||
json_out_direct(jout, 1)[0] = '\0';
|
||||
json_out_finished(jout);
|
||||
|
||||
size_t len;
|
||||
return json_out_contents(jout,&len);
|
||||
}
|
||||
|
||||
/* How much does this flow deliver to destination? */
|
||||
struct amount_msat payflow_delivered(const struct pay_flow *flow)
|
||||
{
|
||||
|
|
|
@ -134,9 +134,6 @@ struct pf_result *pay_flow_succeeded(struct pay_flow *pf STEALS,
|
|||
/* Formatting helpers */
|
||||
const char *flow_path_to_str(const tal_t *ctx, const struct pay_flow *flow);
|
||||
|
||||
const char* fmt_payflows(const tal_t *ctx,
|
||||
struct pay_flow ** flows);
|
||||
|
||||
/* How much does this flow deliver to destination? */
|
||||
struct amount_msat payflow_delivered(const struct pay_flow *flow);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue