Pass error through from trace to liquidation

This commit is contained in:
Luke Van Seters 2021-12-23 10:09:32 -05:00
parent 115167096e
commit 21826dd308
5 changed files with 7 additions and 1 deletions

View File

@ -70,6 +70,7 @@ def get_aave_liquidations(
transaction_hash=trace.transaction_hash,
trace_address=trace.trace_address,
block_number=trace.block_number,
error=trace.error,
)
)

View File

@ -48,6 +48,7 @@ def get_compound_liquidations(
transaction_hash=trace.transaction_hash,
trace_address=trace.trace_address,
block_number=trace.block_number,
error=trace.error,
)
)
elif (
@ -65,6 +66,7 @@ def get_compound_liquidations(
transaction_hash=trace.transaction_hash,
trace_address=trace.trace_address,
block_number=trace.block_number,
error=trace.error,
)
)
return liquidations

View File

@ -75,8 +75,9 @@ class MEVInspector:
except CancelledError:
logger.info("Requested to exit, cleaning up...")
except Exception as e:
logger.error(f"Existed due to {type(e)}")
logger.error(f"Exited due to {type(e)}")
traceback.print_exc()
raise
async def safe_inspect_many_blocks(
self,

View File

@ -16,3 +16,4 @@ class LiquidationModel(Base):
transaction_hash = Column(String, primary_key=True)
trace_address = Column(ARRAY(Integer), primary_key=True)
block_number = Column(Numeric, nullable=False)
error = Column(String, nullable=True)

View File

@ -16,3 +16,4 @@ class Liquidation(BaseModel):
transaction_hash: str
trace_address: List[int]
block_number: str
error: Optional[str]