pay-plugin: set gossmods directly
Multiple places in the pay lifecycle depend on mods to be set. By setting the mods directly after the first listpeerchannels call, subsequent calls to listpeerchannels are avoided. Changelog-Fixed: pay-plugin: only call listpeerchannels once during a payment lifecycle.
This commit is contained in:
committed by
Christian Decker
parent
281c639b57
commit
8330e3a0df
@@ -2603,6 +2603,8 @@ local_channel_hints_listpeerchannels(struct command *cmd, const char *buffer,
|
||||
* otherwise start out as excluded and remain so until
|
||||
* forever. */
|
||||
channel_hint_set_update(payment_root(p)->hints, time_now());
|
||||
p->mods = gossmods_from_listpeerchannels(
|
||||
p, p->local_id, buffer, toks, true, gossmod_add_localchan, NULL);
|
||||
|
||||
payment_continue(p);
|
||||
return command_still_pending(cmd);
|
||||
|
||||
Reference in New Issue
Block a user