mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
paymod: Add reason why a payment was attempted
This is a slight change in interface in that the string no longer spells out that a specific node was excluded.
This commit is contained in:
@@ -21,6 +21,7 @@ struct payment *payment_new(tal_t *ctx, struct command *cmd,
|
||||
p->start_time = time_now();
|
||||
p->result = NULL;
|
||||
p->getroute_cltv = DEFAULT_FINAL_CLTV_DELTA;
|
||||
p->why = NULL;
|
||||
|
||||
/* Copy over the relevant pieces of information. */
|
||||
if (parent != NULL) {
|
||||
@@ -1144,6 +1145,9 @@ static inline void retry_step_cb(struct retry_mod_data *rd,
|
||||
subpayment = payment_new(p, NULL, p, p->modifiers);
|
||||
payment_start(subpayment);
|
||||
p->step = PAYMENT_STEP_RETRY;
|
||||
subpayment->why =
|
||||
tal_fmt(subpayment, "Still have %d attempts left",
|
||||
rdata->retries - 1);
|
||||
}
|
||||
|
||||
payment_continue(p);
|
||||
|
||||
Reference in New Issue
Block a user