Files
plm-lottery/scripts/electrum_smoke_test.py
T
davideandClaude Sonnet 5 df72367f02 Implement full MVP: auth, HD wallet, Electrum client, deposits, bets, round/draw engine, payout, withdrawals, RBF, admin+audit
All 10 build-order stages complete and unit-tested (49 tests). Verified live on
mainnet: registration/address derivation, deposit crediting, a real 10 PLM bet
(broadcast + confirmed + change credited). A full round close->draw->payout
cycle was triggered live and was in progress at commit time. Withdrawal and RBF
bump are unit-tested but not yet exercised against a live broadcast. Known gaps
(scheduler doesn't resume mid-flight rounds after restart, payout has no retry,
no deployment setup, etc.) are documented in CLAUDE.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-20 23:52:20 +02:00

28 lines
705 B
Python

"""Manual smoke test: connect to the configured Electrum server, do the
server.version handshake, subscribe to headers and confirm a sane tip height.
Usage: PYTHONPATH=. python scripts/electrum_smoke_test.py
"""
import asyncio
from app.config import settings
from app.electrum.client import ElectrumClient
async def main() -> None:
client = ElectrumClient(settings.electrum_host, settings.electrum_port, settings.electrum_use_ssl)
await client.connect()
print("connected + handshake OK")
header = await client.subscribe_headers()
print("tip:", header)
assert header["height"] > 0
await client.close()
print("OK")
if __name__ == "__main__":
asyncio.run(main())