Resubmit tx within `on_broadcast_failure` callback; removes the queued tx and resubmits a new tx. This prevents other queued txs for other rituals from being starved by one failing tx for a specific ritual.

pull/3489/head
derekpierre 2024-04-23 13:12:24 -04:00
parent 6089db5fa8
commit 394dc6018e
No known key found for this signature in database
1 changed files with 7 additions and 0 deletions

View File

@ -385,6 +385,13 @@ class Operator(BaseActor):
f"{tx_type} async tx {tx.id} for DKG ritual# {phase_id.ritual_id} "
f"failed to broadcast {e}; the same tx will be retried"
)
# either multiple retries already completed for recoverable error,
# or simply a non-recoverable error - remove and resubmit
# (analogous action to a node restart of old)
self.coordinator_agent.blockchain.tx_machine.remove_queued_transaction(tx)
# submit a new one
resubmit_tx()
def on_fault(tx: FaultedTx):
# fault means that tx was removed from atxm