lifecycle.tick runs the round from open to closed one write-locked step at a time, resumable from the database (an interrupted draw gives the same winner). Draw primitives move to plm_engine.draw and are shared with the old module. SimulatedChain and settle() stand in for blocks and confirmations; the worker runs both every tick and opens the first round. The round secret is stored encrypted and revealed with the winner; the proof exposes no usernames. Mutation checks confirmed the wait for in-flight bets and the txid ordering are caught by the tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
12 lines
376 B
Python
12 lines
376 B
Python
"""The address under which a participant appears in the public draw list (RND-14, DAT-65)."""
|
|
|
|
from django.conf import settings
|
|
|
|
from .simulation import simulated_address
|
|
|
|
|
|
def participant_address(user) -> str:
|
|
if settings.LEDGER_BACKEND == "simulated":
|
|
return simulated_address(user)
|
|
raise NotImplementedError("HD addresses arrive with phase B (roadmap B4)")
|