This commit is contained in:
tim
2025-03-19 17:31:34 -04:00
parent 4492d23c47
commit a06eeeb10d
2 changed files with 5 additions and 1 deletions

View File

@@ -190,6 +190,7 @@ async def main():
while True: while True:
wake_up = now() + delay wake_up = now() + delay
# log.debug(f'querying {pool}') # log.debug(f'querying {pool}')
tx = None
try: try:
price = await get_pool_price(pool) price = await get_pool_price(pool)
if price != last_prices.get(pool): if price != last_prices.get(pool):
@@ -201,6 +202,9 @@ async def main():
log.debug(f'Mirrored {addr} {price}') log.debug(f'Mirrored {addr} {price}')
except Exception as x: except Exception as x:
log.debug(f'Could not update {pool}: {x}') log.debug(f'Could not update {pool}: {x}')
if tx is not None:
tx.account.reset_nonce()
tx.account.release()
continue continue
try: try:
pool = next(pool_iter) pool = next(pool_iter)

View File

@@ -614,11 +614,11 @@ class TrancheTrigger:
self.order_trigger.expire_tranche(self.tk.tranche_index) self.order_trigger.expire_tranche(self.tk.tranche_index)
def expire(self): def expire(self):
self.disable()
if self.closed: if self.closed:
return return
order_log.debug(f'tranche expired {self.tk}') order_log.debug(f'tranche expired {self.tk}')
self.status = TrancheState.Expired self.status = TrancheState.Expired
self.disable()
def kill(self): def kill(self):
order_log.warning(f'tranche KILLED {self.tk}') order_log.warning(f'tranche KILLED {self.tk}')