pay: Use the total_mast amount as the upper limit for channel_hints

This commit is contained in:
Christian Decker
2024-07-25 17:40:58 +02:00
parent 1eb878be82
commit 5225218094
6 changed files with 62 additions and 25 deletions

View File

@@ -384,12 +384,16 @@ static void add_connection(int store_fd,
ids[0], ids[1],
&dummy_key, &dummy_key);
write_to_store(store_fd, msg);
msg = towire_gossip_store_channel_amount(tmpctx, AMOUNT_SAT(10000));
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)