Skip to main content

Crate lnv2_module_tests

Crate lnv2_module_tests 

Source

Modulesยง

common ๐Ÿ”’

Structsยง

Cli ๐Ÿ”’
LnUrlPayInvoiceResponse ๐Ÿ”’
LnUrlPayResponse ๐Ÿ”’

Enumsยง

Commands ๐Ÿ”’

Constantsยง

LNURL_BALANCE_WAIT_ATTEMPTS ๐Ÿ”’
REFUSED_SEND_WATCH ๐Ÿ”’
How long a send refused by the gateway is watched to stay unresolved.

Functionsยง

add_gateway ๐Ÿ”’
assert_duplicates_refunded ๐Ÿ”’
The duplicate-payment assertions for gateways that claim the payment image only after paying and forfeit the duplicates: one settles, two are refunded.
assert_duplicates_refused ๐Ÿ”’
The duplicate-payment assertions for gateways that claim the payment image at intake: one send settles, the gateway refuses the other two without paying or forfeiting anything, so they stay unresolved until their contracts expire, and the gateway is reimbursed exactly once.
assert_module_sanity ๐Ÿ”’
await_send_within ๐Ÿ”’
Waits up to watch for a send to reach its final state, returning None if it is still unresolved by then.
fetch_invoice ๐Ÿ”’
generate_lnurl ๐Ÿ”’
join_client ๐Ÿ”’
Creates a fresh client and joins it to the federation identified by invite_code, unlike Federation::new_joined_client which always joins whichever federation last wrote the shared invite-code file.
main ๐Ÿ”’
module_is_present ๐Ÿ”’
pegin_gateways ๐Ÿ”’
remove_all_gateways ๐Ÿ”’
Remove all currently registered gateways, including the ones devimint adds on startup, from the given peers.
remove_gateway ๐Ÿ”’
test_duplicate_payment ๐Ÿ”’
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.
test_federation_outage ๐Ÿ”’
Stops enough guardians that no threshold of them can answer, checks that a receive is refused without the gateway funding anything, then checks that receives work again once the guardians are back.
test_fees ๐Ÿ”’
test_gateway_registration ๐Ÿ”’
test_iroh_payment ๐Ÿ”’
test_lnurl_pay ๐Ÿ”’
test_lnurl_recovery ๐Ÿ”’
Tests LNURL receives after recovery from seed.
test_payments ๐Ÿ”’
verify_payment ๐Ÿ”’
verify_payment_wait ๐Ÿ”’
verify_preimage ๐Ÿ”’
wait_for_lnurl_balance ๐Ÿ”’