Skip to main content

test_duplicate_payment

Function test_duplicate_payment 

Source
pub(crate) async fn test_duplicate_payment(
    dev_fed: &DevJitFed,
    process_mgr: &ProcessManager,
) -> Result<()>
Expand description

Three independent clients — two in the primary federation and one in a second federation, all served by the same gateway — race to pay the same invoice. The gateway pays the invoice only once, so it may claim only one of the three outgoing contracts regardless of which federation funded them; the other two must be forfeited and refunded. Exactly one payment settles.