MCPcopy Create free account
hub / github.com/ElementsProject/lightning / knowledgerelax_cb

Function knowledgerelax_cb

plugins/renepay/mods.c:1166–1177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1164 */
1165
1166static struct command_result *knowledgerelax_cb(struct payment *payment)
1167{
1168 const u64 now_sec = clock_time().ts.tv_sec;
1169 enum renepay_errorcode err = uncertainty_relax(
1170 pay_plugin->uncertainty, now_sec - pay_plugin->last_time);
1171 if (err)
1172 plugin_err(pay_plugin->plugin,
1173 "uncertainty_relax failed with error %s",
1174 renepay_errorcode_name(err));
1175 pay_plugin->last_time = now_sec;
1176 return payment_continue(payment);
1177}
1178
1179REGISTER_PAYMENT_MODIFIER(knowledgerelax, knowledgerelax_cb);
1180

Callers

nothing calls this directly

Calls 5

clock_timeFunction · 0.85
uncertainty_relaxFunction · 0.85
renepay_errorcode_nameFunction · 0.85
payment_continueFunction · 0.70
plugin_errFunction · 0.50

Tested by

no test coverage detected