Fix KeyError bug when clearing cached async tx if it doesn't already exist.

pull/3476/head
derekpierre 2024-04-12 08:41:27 -04:00
parent 43c9d92c63
commit fd4b209f9e
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ class DKGStorage:
def clear_ritual_phase_async_tx(self, phase_id: PhaseId, async_tx: AsyncTx) -> bool:
key = self.__get_phase_key(phase_id.phase)
if self._data[key][phase_id.ritual_id] is async_tx:
if self._data[key].get(phase_id.ritual_id) is async_tx:
del self._data[key][phase_id.ritual_id]
return True
return False