bugfix
This commit is contained in:
@@ -190,6 +190,7 @@ async def main():
|
||||
while True:
|
||||
wake_up = now() + delay
|
||||
# log.debug(f'querying {pool}')
|
||||
tx = None
|
||||
try:
|
||||
price = await get_pool_price(pool)
|
||||
if price != last_prices.get(pool):
|
||||
@@ -201,6 +202,9 @@ async def main():
|
||||
log.debug(f'Mirrored {addr} {price}')
|
||||
except Exception as x:
|
||||
log.debug(f'Could not update {pool}: {x}')
|
||||
if tx is not None:
|
||||
tx.account.reset_nonce()
|
||||
tx.account.release()
|
||||
continue
|
||||
try:
|
||||
pool = next(pool_iter)
|
||||
|
||||
@@ -614,11 +614,11 @@ class TrancheTrigger:
|
||||
self.order_trigger.expire_tranche(self.tk.tranche_index)
|
||||
|
||||
def expire(self):
|
||||
self.disable()
|
||||
if self.closed:
|
||||
return
|
||||
order_log.debug(f'tranche expired {self.tk}')
|
||||
self.status = TrancheState.Expired
|
||||
self.disable()
|
||||
|
||||
def kill(self):
|
||||
order_log.warning(f'tranche KILLED {self.tk}')
|
||||
|
||||
Reference in New Issue
Block a user