B7: confirmations with merkle proof, adoption of the confirmed version, RBF bumper and reconciler (TX-30..33, DAT-85)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
feff993584
commit
fa57d2e5ab
20 files changed
+1165
-20
No files matched your search
@@ -42,13 +42,18 @@ def process_chain_bets() -> None:
|
||||
"""BET-31/32: sign what the web admitted, send what was signed. On a real ledger only."""
|
||||
from django.conf import settings
|
||||
|
||||
from apps.lottery import bets
|
||||
from apps.lottery import bets, confirmation, rbf, reconcile
|
||||
from apps.lottery.electrum_chain import ElectrumChain
|
||||
|
||||
chain = ElectrumChain(settings.ELECTRUM_ENDPOINTS, settings.PLM_PROFILE, settings.ELECTRUM_ALLOW_NO_QUORUM)
|
||||
done = bets.process_bets(chain)
|
||||
if any(done.values()):
|
||||
logger.info("bets: %s", done)
|
||||
confirmed = confirmation.poll_confirmations(chain) # B7: TX-30
|
||||
bumped = rbf.bump_due(chain) # TX-32
|
||||
reconciled = reconcile.reconcile_once(chain) # TX-33
|
||||
if confirmed or bumped or any(reconciled.values()):
|
||||
logger.info("transactions: confirmed=%s bumped=%s reconciled=%s", confirmed, bumped, reconciled)
|
||||
|
||||
|
||||
def tick() -> None:
|
||||
|
||||
Reference in new issue
Block a user