fedimint_ln_client::pay

Function try_refund_outgoing_contract

source
async fn try_refund_outgoing_contract(
    old_state: LightningPayStateMachine,
    common: LightningPayCommon,
    dbtx: &mut ClientSMDatabaseTransaction<'_, '_>,
    global_context: DynGlobalClientContext,
    error_reason: String,
) -> LightningPayStateMachine
Expand description

Claims a refund for an expired or cancelled outgoing contract

This can be necessary when the Lightning gateway cannot route the payment, is malicious or offline. The function returns the out point of the e-cash output generated as change.