debug printouts; removed incorrect test account from secret-mock
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
[accounts]
|
||||
test='0x065b7ef20b68ff99e71774acae7759a873073ac3d3c502ceb90f01efb3c48079' # address 0xE1918Fc43C3a9c4854463e86Af854BE7034Fab56
|
||||
|
||||
[rpc_urls]
|
||||
local='http://localhost:8545'
|
||||
|
||||
@@ -221,7 +221,7 @@ class Tranche:
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
msg = f'{self.fraction/MAX_FRACTION:.1%} {self.startTime} to {self.endTime}'
|
||||
msg = f'{self.fraction/MAX_FRACTION:.1%} {"start+" if self.startTimeIsRelative else ""}{self.startTime} to {"start+" if self.startTimeIsRelative else ""}{self.endTime}'
|
||||
if self.marketOrder:
|
||||
msg += ' market order'
|
||||
else:
|
||||
|
||||
@@ -277,7 +277,6 @@ async def process_execution_requests():
|
||||
tk: TrancheKey
|
||||
er: ExecutionRequest
|
||||
pending = inflight_execution_requests.get(tk)
|
||||
log.debug(f'tranche key {tk} pending height: {pending}')
|
||||
if pending is None or height-pending >= 30: # todo execution timeout => retry ; should we use timestamps? configure per-chain.
|
||||
execs[tk] = er
|
||||
else:
|
||||
@@ -286,10 +285,9 @@ async def process_execution_requests():
|
||||
# execute the list
|
||||
# todo batch execution
|
||||
for tk, er in execs.items():
|
||||
log.info(f'executing tranche {tk}')
|
||||
job = submit_transaction_request(new_tranche_execution_request(tk, er.proof))
|
||||
inflight_execution_requests[tk] = height
|
||||
log.info(f'executing tranche {tk} with job {job.id}')
|
||||
log.info(f'created job {job.id} to execute tranche {tk}')
|
||||
|
||||
|
||||
def handle_dexorderexecutions(event: EventData):
|
||||
|
||||
@@ -29,6 +29,7 @@ class TrancheExecutionHandler (TransactionHandler):
|
||||
async def complete_transaction(self, job: TransactionJob) -> None:
|
||||
req: TrancheExecutionRequest = job.request
|
||||
tk = TrancheKey(req.vault, req.order_index, req.tranche_index)
|
||||
log.debug(f'execution request {tk} no longer in-flight')
|
||||
del inflight_execution_requests[tk] # no longer in-flight
|
||||
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ async def create_transactions():
|
||||
|
||||
|
||||
async def create_transaction(job: TransactionJob):
|
||||
log.info(f'building transaction request for {job.request.__class__.__name__} {job.id}')
|
||||
try:
|
||||
handler = TransactionHandler.of(job.request.type)
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user