B1: plm_engine takes the modules without a database (ADR-59)
HD derivation (pure part), PSBT builder, Electrum client/merkle/quorum/scripthash, network profile, addresses and header checks move to plm_engine; the old stack imports them from there. A test forbids framework imports in the package. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c9784efa07
commit
3ee60a23da
87 files changed
+290
-260
No files matched your search
@@ -243,7 +243,7 @@ async def test_full_balance_withdrawal_keeps_a_bumpable_change_output(session_fa
|
||||
already spends every UTXO the user has. So a dust limit stays behind instead."""
|
||||
from embit.transaction import Transaction
|
||||
|
||||
from app.wallet.psbt_builder import DUST_LIMIT_SATS
|
||||
from plm_engine.psbt_builder import DUST_LIMIT_SATS
|
||||
|
||||
balance = 2_000_000_000
|
||||
user_id = await _make_funded_user(session_factory, 40, balance)
|
||||
@@ -272,7 +272,7 @@ async def test_a_bet_from_a_balance_equal_to_the_bet_is_refused(session_factory)
|
||||
a documented invariant of the PLAY phase; this is where it's enforced, with an
|
||||
error that says how much more is needed rather than a bare "insufficient"."""
|
||||
from app.bets.service import BetError
|
||||
from app.wallet.psbt_builder import DUST_LIMIT_SATS
|
||||
from plm_engine.psbt_builder import DUST_LIMIT_SATS
|
||||
|
||||
user_id = await _make_funded_user(session_factory, 41, BET_AMOUNT_SATS) # exactly the bet
|
||||
client = FakeElectrumClient()
|
||||
@@ -292,7 +292,7 @@ async def test_a_bet_from_a_balance_equal_to_the_bet_is_refused(session_factory)
|
||||
|
||||
|
||||
async def test_a_bet_with_a_dust_limit_of_headroom_is_accepted(session_factory):
|
||||
from app.wallet.psbt_builder import DUST_LIMIT_SATS
|
||||
from plm_engine.psbt_builder import DUST_LIMIT_SATS
|
||||
|
||||
user_id = await _make_funded_user(session_factory, 42, BET_AMOUNT_SATS + DUST_LIMIT_SATS)
|
||||
client = FakeElectrumClient()
|
||||
|
||||
Reference in new issue
Block a user