B6: atomic UTXO reservation, bet signed by the worker and saved before broadcast, broadcast verdicts (BET-30..33)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2acd4ccd1c
commit
feff993584
25 files changed
+995
-53
No files matched your search
@@ -104,15 +104,20 @@ def test_a_round_copies_its_rules_when_it_opens(t0):
|
||||
assert (round_.draw_confirmations, round_.cooldown_seconds, round_.fee_address) == (5, 11, "rplm1fee")
|
||||
|
||||
|
||||
def test_a_real_ledger_needs_a_fee_address_to_open_a_round(settings, t0):
|
||||
"""ADR-29: a round that cannot pay its commission is not opened. The simulated ledger needs none."""
|
||||
def test_a_real_ledger_needs_a_fee_address_to_open_a_round(settings, t0, tmp_path):
|
||||
"""ADR-29: a round that cannot pay its commission is not opened. The simulated ledger needs none. A real one
|
||||
also derives the round's pool address from the public key (DAT-60), so it needs that configured."""
|
||||
from apps.lottery import keys
|
||||
|
||||
assert lifecycle.rounds_can_open(LotteryConfig.get())
|
||||
settings.LEDGER_BACKEND = "chain"
|
||||
settings.PLM_ACCOUNT_XPUB = keys.generate_keys(tmp_path / "keys", settings.PLM_PROFILE)
|
||||
assert lifecycle.open_new_round_if_needed(t0) is None
|
||||
config = LotteryConfig.get()
|
||||
config.fee_address = "rplm1fee"
|
||||
config.save()
|
||||
assert lifecycle.open_new_round_if_needed(t0) is not None
|
||||
opened = lifecycle.open_new_round_if_needed(t0)
|
||||
assert opened is not None and opened.pool_address.startswith("rplm1") # its own address, from the public key
|
||||
|
||||
|
||||
def test_the_pause_after_the_round_stops_only_the_next_one(t0):
|
||||
|
||||
Reference in new issue
Block a user