Skip to content

Commit

Permalink
speed things up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Sep 23, 2024
1 parent bedbc64 commit a43f822
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 0 additions & 5 deletions tests/test_mint_melt.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from tests.conftest import SERVER_ENDPOINT
from tests.helpers import (
is_regtest,
pay_if_regtest,
)

SEED = "TEST_PRIVATE_KEY"
Expand Down Expand Up @@ -187,7 +186,6 @@ async def test_fakewallet_pending_quote_get_melt_quote_unknown(ledger: Ledger):
@pytest.mark.skipif(is_regtest, reason="only fake wallet")
async def test_melt_lightning_pay_invoice_settled(ledger: Ledger, wallet: Wallet):
invoice = await wallet.request_mint(64)
await pay_if_regtest(invoice.bolt11)
await ledger.get_mint_quote(invoice.id) # fakewallet: set the quote to paid
await wallet.mint(64, id=invoice.id)
# invoice_64_sat = "lnbcrt640n1pn0r3tfpp5e30xac756gvd26cn3tgsh8ug6ct555zrvl7vsnma5cwp4g7auq5qdqqcqzzsxqyz5vqsp5xfhtzg0y3mekv6nsdnj43c346smh036t4f8gcfa2zwpxzwcryqvs9qxpqysgqw5juev8y3zxpdu0mvdrced5c6a852f9x7uh57g6fgjgcg5muqzd5474d7xgh770frazel67eejfwelnyr507q46hxqehala880rhlqspw07ta0"
Expand All @@ -208,7 +206,6 @@ async def test_melt_lightning_pay_invoice_settled(ledger: Ledger, wallet: Wallet
@pytest.mark.skipif(is_regtest, reason="only fake wallet")
async def test_melt_lightning_pay_invoice_failed_failed(ledger: Ledger, wallet: Wallet):
invoice = await wallet.request_mint(64)
await pay_if_regtest(invoice.bolt11)
await ledger.get_mint_quote(invoice.id) # fakewallet: set the quote to paid
await wallet.mint(64, id=invoice.id)
# invoice_64_sat = "lnbcrt640n1pn0r3tfpp5e30xac756gvd26cn3tgsh8ug6ct555zrvl7vsnma5cwp4g7auq5qdqqcqzzsxqyz5vqsp5xfhtzg0y3mekv6nsdnj43c346smh036t4f8gcfa2zwpxzwcryqvs9qxpqysgqw5juev8y3zxpdu0mvdrced5c6a852f9x7uh57g6fgjgcg5muqzd5474d7xgh770frazel67eejfwelnyr507q46hxqehala880rhlqspw07ta0"
Expand Down Expand Up @@ -258,7 +255,6 @@ async def test_melt_lightning_pay_invoice_failed_settled(
ledger: Ledger, wallet: Wallet
):
invoice = await wallet.request_mint(64)
await pay_if_regtest(invoice.bolt11)
await ledger.get_mint_quote(invoice.id) # fakewallet: set the quote to paid
await wallet.mint(64, id=invoice.id)
invoice_62_sat = "lnbcrt620n1pn0r3vepp5zljn7g09fsyeahl4rnhuy0xax2puhua5r3gspt7ttlfrley6valqdqqcqzzsxqyz5vqsp577h763sel3q06tfnfe75kvwn5pxn344sd5vnays65f9wfgx4fpzq9qxpqysgqg3re9afz9rwwalytec04pdhf9mvh3e2k4r877tw7dr4g0fvzf9sny5nlfggdy6nduy2dytn06w50ls34qfldgsj37x0ymxam0a687mspp0ytr8"
Expand All @@ -283,7 +279,6 @@ async def test_melt_lightning_pay_invoice_failed_pending(
ledger: Ledger, wallet: Wallet
):
invoice = await wallet.request_mint(64)
await pay_if_regtest(invoice.bolt11)
await ledger.get_mint_quote(invoice.id) # fakewallet: set the quote to paid
await wallet.mint(64, id=invoice.id)
invoice_62_sat = "lnbcrt620n1pn0r3vepp5zljn7g09fsyeahl4rnhuy0xax2puhua5r3gspt7ttlfrley6valqdqqcqzzsxqyz5vqsp577h763sel3q06tfnfe75kvwn5pxn344sd5vnays65f9wfgx4fpzq9qxpqysgqg3re9afz9rwwalytec04pdhf9mvh3e2k4r877tw7dr4g0fvzf9sny5nlfggdy6nduy2dytn06w50ls34qfldgsj37x0ymxam0a687mspp0ytr8"
Expand Down
5 changes: 2 additions & 3 deletions tests/test_mint_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ async def wallet1(ledger: Ledger):
async def test_melt_internal(wallet1: Wallet, ledger: Ledger):
# mint twice so we have enough to pay the second invoice back
invoice = await wallet1.request_mint(128)
await pay_if_regtest(invoice.bolt11)
await ledger.get_mint_quote(invoice.id)
await wallet1.mint(128, id=invoice.id)
await pay_if_regtest(invoice.bolt11)
assert wallet1.balance == 128

# create a mint quote so that we can melt to it internally
Expand Down Expand Up @@ -106,7 +105,7 @@ async def test_melt_external(wallet1: Wallet, ledger: Ledger):
@pytest.mark.skipif(is_regtest, reason="only works with FakeWallet")
async def test_mint_internal(wallet1: Wallet, ledger: Ledger):
invoice = await wallet1.request_mint(128)
await pay_if_regtest(invoice.bolt11)
await ledger.get_mint_quote(invoice.id)
mint_quote = await ledger.get_mint_quote(invoice.id)

assert mint_quote.paid, "mint quote should be paid"
Expand Down

0 comments on commit a43f822

Please sign in to comment.