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
@@ -462,14 +462,3 @@ def test_the_round_secret_needs_the_right_key(settings):
|
||||
settings.SECRET_KEY = "another-key-" + "y" * 50
|
||||
with pytest.raises(RuntimeError):
|
||||
decrypt_seed(token)
|
||||
|
||||
|
||||
def test_the_old_draw_module_and_the_engine_share_one_implementation():
|
||||
"""ADR-59: the primitives live once, in `plm_engine.draw`; the old module re-exports them."""
|
||||
import plm_engine.draw as engine
|
||||
from app.rounds import draw as old
|
||||
|
||||
for name in ("draw_seed", "draw_index", "draw_winner", "participants_hash", "new_server_seed",
|
||||
"server_seed_commitment", "sha256_hex"):
|
||||
assert getattr(old, name) is getattr(engine, name)
|
||||
assert engine.sha256_hex(b"x") == hashlib.sha256(b"x").hexdigest()
|
||||
Reference in new issue
Block a user