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. Exactly one payment settles; how the other two end depends on the gateway version, see assert_duplicates_refunded and assert_duplicates_refused.