lightningd/payalgo.c
static const char *should_delay_retry(const tal_t *ctx,
				      const struct sendpay_result *r)
{
	/* The routing failures WIRE_EXPIRY_TOO_FAR, WIRE_EXPIRY_TOO_SOON,
	 * and WIRE_FINAL_EXPIRY_TOO_SOON may arise due to disagreement
	 * between the peers about what the block heights are. So
	 * delay for those before retrying. */
	if (!r->succeeded && r->errorcode == PAY_TRY_OTHER_ROUTE) {
		switch (r->routing_failure->failcode) {
		case WIRE_EXPIRY_TOO_FAR:
		case WIRE_EXPIRY_TOO_SOON:
		case WIRE_FINAL_EXPIRY_TOO_SOON:
			return tal_fmt(ctx,
				       "Possible blockheight disagreement "
				       "(%s from peer)",
				       onion_type_name(r->routing_failure->failcode));

		default:
			/* Do nothing */ ;
		}
	}

	return NULL;
}
/* Determine if we should delay before retrying. Return a reason
 * string, or NULL if we will not retry */
Determine if we should delay before retrying. Return a reason
string, or NULL if we will not retry
Determine if we should delay before retrying . Return a reason string or NULL if we will not retry
static const char *should_delay_retry(const tal_t *ctx,
				      const struct sendpay_result *r)
{
	if (!r->succeeded && r->errorcode == PAY_TRY_OTHER_ROUTE) {
		switch (r->routing_failure->failcode) {
		case WIRE_EXPIRY_TOO_FAR:
		case WIRE_EXPIRY_TOO_SOON:
		case WIRE_FINAL_EXPIRY_TOO_SOON:
			return tal_fmt(ctx,
				       "Possible blockheight disagreement "
				       "(%s from peer)",
				       onion_type_name(r->routing_failure->failcode));
		default:
			 ;
		}
	}
	return NULL;
}
static const char * should_delay_retry ( const tal_t * ctx , const struct sendpay_result * r ) { if ( ! r -> succeeded && r -> errorcode == PAY_TRY_OTHER_ROUTE ) { switch ( r -> routing_failure -> failcode ) { case WIRE_EXPIRY_TOO_FAR : case WIRE_EXPIRY_TOO_SOON : case WIRE_FINAL_EXPIRY_TOO_SOON : return tal_fmt ( ctx , " " " " , onion_type_name ( r -> routing_failure -> failcode ) ) ; default : ; } } return NULL ; }
Determine if we should delay before retrying.
Determine if we should delay before retrying .
/* The routing failures WIRE_EXPIRY_TOO_FAR, WIRE_EXPIRY_TOO_SOON,
	 * and WIRE_FINAL_EXPIRY_TOO_SOON may arise due to disagreement
	 * between the peers about what the block heights are. So
	 * delay for those before retrying. */ /* Do nothing */