Skip to content

Commit 90cea4c

Browse files
committed
renepay: remove uncertainty tools
The new uncertainty network will be handled by askrene. Signed-off-by: Lagrang3 <[email protected]>
1 parent b790b7b commit 90cea4c

File tree

7 files changed

+9
-288
lines changed

7 files changed

+9
-288
lines changed

plugins/renepay/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ PLUGIN_RENEPAY_SRC := \
77
plugins/renepay/route.c \
88
plugins/renepay/routetracker.c \
99
plugins/renepay/routefail.c \
10-
plugins/renepay/uncertainty.c \
1110
plugins/renepay/mods.c \
1211
plugins/renepay/errorcodes.c \
1312
plugins/renepay/json.c
@@ -23,7 +22,6 @@ PLUGIN_RENEPAY_HDRS := \
2322
plugins/renepay/route.h \
2423
plugins/renepay/routetracker.h \
2524
plugins/renepay/routefail.h \
26-
plugins/renepay/uncertainty.h \
2725
plugins/renepay/mods.h \
2826
plugins/renepay/errorcodes.h \
2927
plugins/renepay/json.c

plugins/renepay/main.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ struct pay_plugin *pay_plugin;
2929
static void memleak_mark(struct plugin *p, struct htable *memtable)
3030
{
3131
memleak_scan_obj(memtable, pay_plugin);
32-
memleak_scan_htable(memtable,
33-
&pay_plugin->uncertainty->chan_extra_map->raw);
3432
memleak_scan_htable(memtable, &pay_plugin->payment_map->raw);
3533
memleak_scan_htable(memtable, &pay_plugin->pending_routes->raw);
3634
}
@@ -82,14 +80,6 @@ static const char *init(struct plugin *p,
8280
plugin_log(p, LOG_DBG,
8381
"gossmap ignored %zu channel updates",
8482
num_channel_updates_rejected);
85-
pay_plugin->uncertainty = uncertainty_new(pay_plugin);
86-
int skipped_count =
87-
uncertainty_update(pay_plugin->uncertainty, pay_plugin->gossmap);
88-
if (skipped_count)
89-
plugin_log(pay_plugin->plugin, LOG_UNUSUAL,
90-
"%s: uncertainty was updated but %d channels have "
91-
"been ignored.",
92-
__func__, skipped_count);
9383

9484
plugin_set_memleak_handler(p, memleak_mark);
9585
return NULL;

plugins/renepay/payplugin.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <plugins/renepay/flow.h>
88
#include <plugins/renepay/payment.h>
99
#include <plugins/renepay/renepayconfig.h>
10-
#include <plugins/renepay/uncertainty.h>
1110

1211
// TODO(eduardo): renepaystatus should be similar to paystatus
1312

@@ -59,9 +58,6 @@ struct pay_plugin {
5958
/* All the struct payment */
6059
struct payment_map *payment_map;
6160

62-
/* Per-channel metadata: some persists between payments */
63-
struct uncertainty *uncertainty;
64-
6561
/* Pending sendpays. Each pending route has an associated HTLC data in
6662
* the uncertainty network. Pending routes are matched against sendpay
6763
* notifications. */

plugins/renepay/routetracker.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static void route_success_register(struct routetracker *routetracker,
9191
struct route *route)
9292
{
9393
if(route->hops){
94-
uncertainty_route_success(pay_plugin->uncertainty, route);
94+
// uncertainty_route_success(pay_plugin->uncertainty, route);
9595
}
9696
routetracker_add_to_final(routetracker, route);
9797
}
@@ -118,9 +118,9 @@ void route_failure_register(struct routetracker *routetracker,
118118
/* All channels before the erring node could forward the
119119
* payment. */
120120
for (int i = 0; i <= last_good_channel; i++) {
121-
uncertainty_channel_can_send(pay_plugin->uncertainty,
122-
route->hops[i].scid,
123-
route->hops[i].direction);
121+
// uncertainty_channel_can_send(pay_plugin->uncertainty,
122+
// route->hops[i].scid,
123+
// route->hops[i].direction);
124124
}
125125

126126
if (result->failcode == WIRE_TEMPORARY_CHANNEL_FAILURE &&
@@ -129,10 +129,10 @@ void route_failure_register(struct routetracker *routetracker,
129129
* enough liquidity to forward the payment or cannot add
130130
* one more HTLC.
131131
*/
132-
uncertainty_channel_cannot_send(
133-
pay_plugin->uncertainty,
134-
route->hops[last_good_channel + 1].scid,
135-
route->hops[last_good_channel + 1].direction);
132+
// uncertainty_channel_cannot_send(
133+
// pay_plugin->uncertainty,
134+
// route->hops[last_good_channel + 1].scid,
135+
// route->hops[last_good_channel + 1].direction);
136136
}
137137
}
138138
routetracker_add_to_final(routetracker, route);
@@ -141,7 +141,7 @@ void route_failure_register(struct routetracker *routetracker,
141141
static void remove_route(struct route *route, struct route_map *map)
142142
{
143143
route_map_del(map, route);
144-
uncertainty_remove_htlcs(pay_plugin->uncertainty, route);
144+
// uncertainty_remove_htlcs(pay_plugin->uncertainty, route);
145145
}
146146

147147
/* This route is pending, ie. locked in HTLCs.
@@ -172,8 +172,6 @@ void route_pending_register(struct routetracker *routetracker,
172172
__func__,
173173
fmt_routekey(tmpctx, &route->key));
174174

175-
uncertainty_commit_htlcs(pay_plugin->uncertainty, route);
176-
177175
if (!tal_steal(pay_plugin->pending_routes, route) ||
178176
!route_map_add(pay_plugin->pending_routes, route) ||
179177
!tal_add_destructor2(route, remove_route,

plugins/renepay/test/run-testflow.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "../payment.c"
1717
#include "../flow.c"
1818
#include "../route.c"
19-
#include "../uncertainty.c"
2019

2120
/* AUTOGENERATED MOCKS START */
2221
/* Generated stub for disabledmap_add_channel */

plugins/renepay/uncertainty.c

Lines changed: 0 additions & 200 deletions
This file was deleted.

plugins/renepay/uncertainty.h

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)