From d2e0f6be46d1f17517a26679d13f7e238ab14ddc Mon Sep 17 00:00:00 2001 From: Rob Cannon Date: Wed, 20 Nov 2024 13:02:17 +0700 Subject: [PATCH] fix: logic for out of order processing --- icon_contracts/workers/transactions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/icon_contracts/workers/transactions.py b/icon_contracts/workers/transactions.py index b40b053..2deed9d 100644 --- a/icon_contracts/workers/transactions.py +++ b/icon_contracts/workers/transactions.py @@ -238,8 +238,9 @@ def process_audit(self): # Checking last_updated_timestamp case for when we see a contract approval # event before we see the contract submission if ( + contract.last_updated_timestamp is None or + contract.last_updated_block is None or self.block.number > contract.last_updated_block - or contract.last_updated_timestamp is None ): logger.info( f"Updating contract status from approval for address = {address} at block = {self.block.number}"