From 92b6cc1c0556acd3bf2877fd71c523c5f8df1941 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 31 Jul 2024 13:13:09 +0200 Subject: [PATCH] fixup! fixup! pay: Use the total_mast amount as the upper limit for channel_hints --- plugins/test/Makefile | 3 ++- plugins/test/run-route-overlong.c | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/test/Makefile b/plugins/test/Makefile index 0165ee8c646c..5bcf2eaad549 100644 --- a/plugins/test/Makefile +++ b/plugins/test/Makefile @@ -19,7 +19,8 @@ plugins/test/run-route-overlong: \ common/fp16.o \ common/gossmap.o \ common/node_id.o \ - common/route.o + common/route.o \ + gossipd/gossip_store_wiregen.o plugins/test/run-route-calc: \ common/fp16.o \ diff --git a/plugins/test/run-route-overlong.c b/plugins/test/run-route-overlong.c index 0f9703ea2aa9..7b105c66df70 100644 --- a/plugins/test/run-route-overlong.c +++ b/plugins/test/run-route-overlong.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -372,10 +373,16 @@ static void add_connection(int store_fd, ids[0], ids[1], &dummy_key, &dummy_key); write_to_store(store_fd, msg); + tal_free(msg); - update_connection(store_fd, from, to, scid, min, max, - base_fee, proportional_fee, - delay, false); + /* Also needs a hint as to the funding size. */ + struct amount_sat capacity = AMOUNT_SAT(100000000); + msg = towire_gossip_store_channel_amount(tmpctx, capacity); + write_to_store(store_fd, msg); + tal_free(msg); + + update_connection(store_fd, from, to, scid, min, max, base_fee, + proportional_fee, delay, false); } static void node_id_from_privkey(const struct privkey *p, struct node_id *id)